The Symmetrical Cascode OTA

Verification

Christian Enz

Swiss Federal Institute of Technology (EPFL), Lausanne, Switzerland

# Initilization¶

# Introduction¶

Schematic of the symmetrical OTA.

This notebook presents the design of the symmetrical cascode OTA which schematic is shown in the above figure. Note that all nMOS transistors have an odd number and all the pMOS transistors an even number which explains the numbering process. We will design the circuit with M1a-M1b in a separate well.

# OTA Characteristics¶

## Sizing summary¶

### Process parameters¶

    Main physical parameters:
    ═════════════════════════

$T =$ 300 K
$U_T =$ 25.875 mV

    Main process parameters for TSMC 0.18um:
    ════════════════════════════════════════

$V_{DD} =$ 1.8 V
$C_{ox} =$ 8.443 $\frac{{fF}}{{\mu m^2}}$
$W_{min} =$ 200 nm
$L_{min} =$ 180 nm

    nNMOS parameters:
    ═════════════════
    Long-channel sEKV parameters:
    ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾

$n =$ 1.27
$I_{spec\Box} =$ 715 nA
$V_{T0} =$ 455 mV
$L_{sat} =$ 26 nm
$\lambda =$ 20 $\frac{{V}}{{\mu m}}$

    Overlap capacitances:
    ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾

$C_{GDo} =$ 0.366 $\frac{{fF}}{{\mu m}}$
$C_{GSo} =$ 0.366 $\frac{{fF}}{{\mu m}}$
$C_{GBo} =$ 0.000 $\frac{{fF}}{{\mu m}}$

    Junction capacitances:
    ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾

$C_J =$ 1.000 $\frac{{fF}}{{\mu m^2}}$
$C_{JSW} =$ 0.200 $\frac{{fF}}{{\mu m}}$

    1/f noise parameters:
    ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾

$K_F =$ 8.1e-24 J
$AF =$ 1.0
$\rho =$ 5.794e-02 $\frac{{V \cdot m^2}}{{A \cdot s}}$

    Matching parameters:
    ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾

$A_{VT} =$ 5 $mV \cdot \mu m$
$A_{\beta} =$ 1 $\% \cdot \mu m$

    Source and drain sheet resistance:
    ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾

$R_{sh} =$ 600 $\frac{\Omega}{\mu m}$

    Channel width and length corrections
    ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾

$\Delta W =$ 39 nm
$\Delta L =$ −76 nm

    pNMOS parameters:
    ═════════════════
    Long-channel sEKV parameters:
    ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾

$n =$ 1.31
$I_{spec\Box} =$ 173 nA
$V_{T0} =$ 445 mV
$L_{sat} =$ 36 nm
$\lambda =$ 20 $\frac{{V}}{{\mu m}}$

    Overlap capacitances:
    ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾

$C_{GDo} =$ 0.329 $\frac{{fF}}{{\mu m}}$
$C_{GSo} =$ 0.329 $\frac{{fF}}{{\mu m}}$
$C_{GBo} =$ 0.000 $\frac{{fF}}{{\mu m}}$

    Junction capacitances:
    ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾

$C_J =$ 1.121 $\frac{{fF}}{{\mu m^2}}$
$C_{JSW} =$ 0.248 $\frac{{fF}}{{\mu m}}$

    1/f noise parameters:
    ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾

$K_F =$ 6.8e-23 J
$AF =$ 1.0
$\rho =$ 4.828e-01 $\frac{{V \cdot m^2}}{{A \cdot s}}$

    Matching parameters:
    ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾

$A_{VT} =$ 5 $mV \cdot \mu m$
$A_{\beta} =$ 1 $\% \cdot \mu m$

    Source and drain sheet resistance:
    ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾

$R_{sh} =$ 2386 $\frac{\Omega}{\mu m}$

    Channel width and length corrections
    ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾

$\Delta W =$ 54 nm
$\Delta L =$ −72 nm

### Specifications¶

| Value
--- | ---
Name |
AdcdB | 1.000e+02
GBWmin | 1.000e+06
CL | 1.000e-12
VDD | 1.800e+00
Wmin | 2.000e-07
Lmin | 1.800e-07
Vosmax | 1.000e-02
PMdeg | 6.000e+01

$A_{dc} =$ 100 dB
$GBW =$ 1 MHz
$W_{min} =$ 200 nm
$L_{min} =$ 180 nm
$V_{os,max} =$ 10 mV
$PM =$ 60 deg

### Bias information¶

| Value
--- | ---
Name |
VDD | 1.800e+00
VSS | 0.000e+00
Ib | 2.500e-07
Vb1 | 9.000e-01
Vb2 | 9.000e-01

$I_b =$ 250 nA
$V_{b1} =$ 900 mV
$V_{b2} =$ 900 mV

### Transistors information¶

| Type | Function | W | L | ID | W/L | Ispec | IC | VP-VS | VG-VT0 | ... | CGSe | CGDe | CGBe | CBSe | CBDe | CGS | CGD | CGB | CBS | CBD
--- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | ---
M1a | n | DP | 2.800e-06 | 8.100e-07 | 2.500e-07 | 3.457e+00 | 2.472e-06 | 1.011e-01 | -5.678e-02 | -4.466e-02 | ... | 1.026e-15 | 1.026e-15 | 0 | 3.712e-15 | 3.712e-15 | 2.603e-15 | 1.026e-15 | 3.750e-15 | 4.140e-15 | 3.712e-15
M1b | n | DP | 2.800e-06 | 8.100e-07 | 2.500e-07 | 3.457e+00 | 2.472e-06 | 1.011e-01 | -5.678e-02 | -4.466e-02 | ... | 1.026e-15 | 1.026e-15 | 0 | 3.712e-15 | 3.712e-15 | 2.603e-15 | 1.026e-15 | 3.750e-15 | 4.140e-15 | 3.712e-15
M2a | p | CM | 3.000e-07 | 5.140e-06 | 2.500e-07 | 5.837e-02 | 1.011e-08 | 2.474e+01 | 2.717e-01 | 2.081e-01 | ... | 9.855e-17 | 9.855e-17 | 0 | 4.428e-15 | 4.428e-15 | 7.845e-15 | 9.855e-17 | 1.235e-15 | 6.799e-15 | 4.428e-15
M2b | p | CM | 3.000e-07 | 5.140e-06 | 2.500e-07 | 5.837e-02 | 1.011e-08 | 2.474e+01 | 2.717e-01 | 2.081e-01 | ... | 9.855e-17 | 9.855e-17 | 0 | 4.428e-15 | 4.428e-15 | 7.845e-15 | 9.855e-17 | 1.235e-15 | 6.799e-15 | 4.428e-15
M2c | p | CM | 3.000e-07 | 5.140e-06 | 2.500e-07 | 5.837e-02 | 1.011e-08 | 2.474e+01 | 2.717e-01 | 2.081e-01 | ... | 9.855e-17 | 9.855e-17 | 0 | 4.428e-15 | 4.428e-15 | 7.845e-15 | 9.855e-17 | 1.235e-15 | 6.799e-15 | 4.428e-15
M2d | p | CM | 3.000e-07 | 5.140e-06 | 2.500e-07 | 5.837e-02 | 1.011e-08 | 2.474e+01 | 2.717e-01 | 2.081e-01 | ... | 9.855e-17 | 9.855e-17 | 0 | 4.428e-15 | 4.428e-15 | 7.845e-15 | 9.855e-17 | 1.235e-15 | 6.799e-15 | 4.428e-15
M3a | n | CM | 2.000e-07 | 9.488e-06 | 2.500e-07 | 2.108e-02 | 1.507e-08 | 1.659e+01 | 2.196e-01 | 1.728e-01 | ... | 7.330e-17 | 7.330e-17 | 0 | 5.773e-15 | 5.773e-15 | 9.342e-15 | 7.330e-17 | 1.441e-15 | 8.288e-15 | 5.773e-15
M3b | n | CM | 2.000e-07 | 9.488e-06 | 2.500e-07 | 2.108e-02 | 1.507e-08 | 1.659e+01 | 2.196e-01 | 1.728e-01 | ... | 7.330e-17 | 7.330e-17 | 0 | 5.773e-15 | 5.773e-15 | 9.342e-15 | 7.330e-17 | 1.441e-15 | 8.288e-15 | 5.773e-15
M4 | p | CA | 2.600e-06 | 1.800e-07 | 2.500e-07 | 1.444e+01 | 2.501e-06 | 9.997e-02 | -5.712e-02 | -4.373e-02 | ... | 8.541e-16 | 8.541e-16 | 0 | 1.904e-15 | 1.904e-15 | 1.176e-15 | 8.541e-16 | 8.503e-16 | 2.003e-15 | 1.904e-15
M5a | n | CM | 2.000e-07 | 9.400e-06 | 5.000e-07 | 2.128e-02 | 1.521e-08 | 3.287e+01 | 3.149e-01 | 2.477e-01 | ... | 7.330e-17 | 7.330e-17 | 0 | 5.720e-15 | 5.720e-15 | 9.674e-15 | 7.330e-17 | 1.339e-15 | 8.325e-15 | 5.720e-15
M5b | n | CM | 2.000e-07 | 9.400e-06 | 5.000e-07 | 2.128e-02 | 1.521e-08 | 3.287e+01 | 3.149e-01 | 2.477e-01 | ... | 7.330e-17 | 7.330e-17 | 0 | 5.720e-15 | 5.720e-15 | 9.674e-15 | 7.330e-17 | 1.339e-15 | 8.325e-15 | 5.720e-15
M7 | n | CA | 6.300e-07 | 1.800e-07 | 2.500e-07 | 3.500e+00 | 2.503e-06 | 9.990e-02 | -5.714e-02 | -4.494e-02 | ... | 2.309e-16 | 2.309e-16 | 0 | 4.374e-16 | 4.374e-16 | 3.089e-16 | 2.309e-16 | 1.877e-16 | 4.586e-16 | 4.374e-16

12 rows × 32 columns

## Open-loop gain¶

$A_{dc} =$ 2.365e+05
$A_{dc} =$ 107.5 dB
$f_0 =$ 4.7 Hz
$GBW =$ 1.1 MHz
$f_{p2} =$ 11.8 MHz
$f_{p3} =$ 12.2 MHz
$f_{p4} =$ 11.8 MHz
$GBW =$ 1.000 MHz (from spec)
$GBW =$ 1.103 MHz (estimation)
$GBW =$ 1.095 MHz (theory)
$f_0 =$ 4.666 Hz
$f_{p2} =$ 11.790 MHz

We can plot the magnitude and phase of the open-loop gain.

    PGBW = −97.870 deg
    PM = 82.130 deg

## Input-referred noise¶

We now can estimate the input-referred noise PSD.

$G_{m1} =$ 6.956 µA/V
$G_{m2} =$ 1.345 µA/V
$G_{m3} =$ 1.651 µA/V
$\frac{G_{m1}}{G_{m2}} =$ 5.170
$\frac{G_{m1}}{G_{m3}} =$ 4.213
$\gamma_{n1} =$ 0.7
$\gamma_{n2} =$ 0.8
$\gamma_{n3} =$ 0.8
$\eta_{th} =$ 0.783
$\gamma_{nota} =$ 2.3
$R_{ninth} =$ 335.085 kOhm
$S_{ninth} =$ 5.5e-15 $\frac{V^2}{Hz}$
$\sqrt{S_{ninth}} =$ 74.5 $\frac{nV}{\sqrt{Hz}}$
$10 \cdot \log(S_{ninth}) =$ -142.6 $\frac{dBv}{\sqrt{Hz}}$

We see that the OTA thermal noise excess factor is only slightly larger than that of the differential pair. This is due to the rather large $G_{m1}/G_{m2}$ and $G_{m1}/G_{m3}$ ratios.

We can now compute the input-referred flicker noise and the corner frequency.

$(G_{m1}/G_{m2})^2 =$ 26.732
$(G_{m1}/G_{m3})^2 =$ 17.751
$\rho_p/\rho_n =$ 8.333
$(W_1\,L_1)/(W_2\,L_2) =$ 1.471
$(W_1\,L_1)/(W_3\,L_3) =$ 1.195
$\eta_{fl} =$ 0.984
$f_k =$ 302.5 kHz

We see that the current mirrors contribute about the same than the differential pair.

We can plot the input-referred noise

## Input-referred offset¶

The variance of the input-referred offset for $A_1=A_2=A_3=1$ is given by \begin{equation} \sigma_{V_{os}}^2 = \sigma_{V_{T1}}^2 \cdot (1 + \xi_{V_T}) + \left(\frac{I_b}{G_{m1}}\right)^2 \cdot \sigma_{\beta 1}^2 \cdot (1 + \xi_{\beta}) \end{equation} where \begin{align} \xi_{V_T} &= 2\left(\frac{G_{m2}}{A_1\,G_{m1}}\right)^2 \cdot \left(\frac{A_{VTp}}{A_{VTn}}\right)^2 \cdot \frac{W_1 L_1}{W_2 L_2} + \left(\frac{G_{m3}}{G_{m1}}\right)^2 \cdot \frac{W_1 L_1}{W_3 L_3},\\ \xi_{\beta} &= 2\left(\frac{A_{\beta p}}{A_{\beta n}}\right)^2 \cdot \frac{W_1 L_1}{W_2 L_2} + \frac{1}{A_1^2} \cdot \frac{W_1 L_1}{W_3 L_3}. \end{align} with \begin{align} \sigma_{V_{T1}}^2 &= \frac{A_{VTn}^2}{W_1 L_1},\\ \sigma_{V_{T2}}^2 &= \frac{A_{VTp}^2}{W_2 L_2},\\ \sigma_{V_{T3}}^2 &= \frac{A_{VTn}^2}{W_3 L_3}, \end{align} and \begin{align} \sigma_{\beta 1}^2 &= \frac{A_{\beta n}^2}{W_1 L_1},\\ \sigma_{\beta 2}^2 &= \frac{A_{\beta p}^2}{W_2 L_2},\\ \sigma_{\beta 3}^2 &= \frac{A_{\beta n}^2}{W_3 L_3}. \end{align}

$\sigma_{VT1} =$ 3.320 mV
$\sigma_{VT2} =$ 4.027 mV
$\sigma_{VT3} =$ 3.630 mV
$\sigma_{\beta 1} =$ 0.664 %
$\sigma_{\beta 2} =$ 0.805 %
$\sigma_{\beta 3} =$ 0.726 %
$\xi_{VT} =$ 0.177
$\xi_{\beta} =$ 4.137
$\sqrt{\sigma_{VT1}^2\,(1+\xi_{VT})} =$ 3.603 mV
$V_{os} =$ 3.643 mV

We see that the $\beta$-mismatch is negligible and that the input-referred offset voltage is dominated by the contribution of the $V_T$-mismatch from the differential pair.

## Current and power consumption¶

The total current consumption, ignoring the current drawn by \M{5a}, is $I_{tot} = (2+A_1+A_3) \cdot I_b$. Assuming the input differential pait M1a-M1b is biased in weak inversion, the bias current is directly related to the gain-bandwidth product $GBW$ according to \begin{equation} I_b \cong n U_T \cdot \frac{C_L}{A_3} \cdot GBW. \end{equation} The total current consumption can then be written as \begin{equation} I_{tot} \cong \frac{2+A_1+A_3}{A_3} \cdot n U_T \cdot C_L \cdot GBW. \end{equation} The bias current and the total current are proportional to the gain-bandwidth product $GBW$ and the load capacitance $C_L$. In the case $A_1=A_2=A_3=1$, $I_{tot} \cong 4 \cdot n U_T \cdot C_L \cdot GBW$.

$I_{tot} = 4 \cdot n U_T \cdot C_L \cdot GBW =$ 827 nA
$I_{tot} = 4 \cdot I_b =$ 1 µA

# Simulation results from Smash¶

The theoretical results can be compared with results obtained from simulations performed with Smash. The cells below will run the simulations with Smash. In order to run the simulations you need to have Smash installed in the default directory.

## Saving parameter file¶

We first write the parameter file for this specific design for running the Smash simulations.

    .param VDD=1.8 Vic=0.9 Vinp=Vic Vinn=Vic Vos=0.000u Vb1=0.9 Vb2=0.9 Ib=250n
    .param CL=1p
    .param W1=2.800u L1=0.810u W2=0.300u L2=5.140u W3=0.200u L3=9.488u W4=2.600u L4=0.180u W5=0.200u L5=9.400u W7=0.630u L7=0.180u

## Operating point¶

To start we need to check the quiescent voltages and currents and the operating points of all transistors by running a .OP simulation.

    Starting Smash simulation...

    ----------------------------------------------------------------------
    -
    - SMASH (TM) release 7.6.0 (64-bit) of Jun 30 2020
    - Copyright (c) Dolphin Design, 1992-2020. All Rights Reserved.
    -
    ----------------------------------------------------------------------

    Output directory L:\My Drive\Lectures\Master\Fundamentals of Analog VLSI Design\2024\Jupyter Notebooks\Symmetrical OTA\Symmetrical OTA (VS)\Simulations\smash\Gain
    Parsing circuit l:\My Drive\Lectures\Master\Fundamentals of Analog VLSI Design\2024\Jupyter Notebooks\Symmetrical OTA\Symmetrical OTA (VS)\Simulations\smash\Gain\Symmetrical_OTA.pat
    Loading circuit l:\My Drive\Lectures\Master\Fundamentals of Analog VLSI Design\2024\Jupyter Notebooks\Symmetrical OTA\Symmetrical OTA (VS)\Simulations\smash\Gain\Symmetrical_OTA.pat
    Processing top-level
    Elaborating circuit...
    Elaborating circuit (creating devices)...
    Elaborating circuit (elaborating devices)...
    Elaborating circuit (logic)...
    Elaborating circuit (creating devices)...
    Elaborating circuit (elaborating devices)...
    Initializing...
    Searching for HZ nets: 0%
    Linking analog resolution matrix...
    Load completed.
    Operating Point
    Operating-Point analysis (trying logarithmic damping heuristics)...
    Iteration    1, residual  9.000e-01 on EINP
    Iteration    2, residual  6.697e-01 on EINP
    Iteration    3, residual  4.657e-01 on EINP
    Iteration    4, residual  2.924e-01 on EINP
    Iteration    5, residual  1.557e-01 on EINP
    Iteration    6, residual  6.180e-02 on EINP
    Iteration    7, residual  1.368e-02 on EINP
    Iteration    8, residual  8.582e-04 on EINP
    Iteration    9, residual  2.481e-04 on VDD
    Iteration   10, residual  6.782e-05 on VDD
    Iteration   11, residual  6.745e-06 on VDD
    Iteration   12, residual  7.553e-08 on VDD
    Iteration   13, residual  9.220e-10 on M7::DI
    Iteration   14, residual  9.400e-12 on M7::DI
    Iteration   15, residual  4.355e-16 on M7::DI

    Operating point analysis completed (converged)

    CPU Time:     1s 593ms 750us
    Elapsed Time: 2s 426ms 7us

We can check the operating point information looking the .op file.

    Contents of the op file:
    ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾

    * ----------------------------------------------------------------------
    * Operating point information at 27 degC
    * ----------------------------------------------------------------------
    *
    * Initial state obtained by resetting everything to zero
    *
    * Convergence obtained with initial logarithmic damping heuristics
    * Number of iterations: 15
    *
    * Minimum parallel DC conductance          (.GMINDC   ): 1e-12
    * Minimum parallel transient conductance   (.GMIN     ): 1e-12
    * Minimum capacitance on analog nets       (.CAPAMIN  ): 0
    *
    * ----------------------------------------------------------------------

    * ----------------------------------------------------------------------
    * Analog nets
    * ----------------------------------------------------------------------

    Nets:

        1        =  4.8942009e-01 V.
        2        =  9.9434033e-01 V.
        3        =  7.1912482e-01 V.
        4        =  9.9434033e-01 V.
        5        =  3.1154848e-01 V.
        6        =  1.3985071e+00 V.
        8        =  8.4210389e-01 V.
        IC       =  9.0000000e-01 V.
        ID       =  0.0000000e+00 V.
        INN      =  9.0000000e-01 V.
        INP      =  9.0000000e-01 V.
        OUT      =  3.1394345e-01 V.
        VB1      =  9.0000000e-01 V.
        VB2      =  9.0000000e-01 V.
        VDD      =  1.8000000e+00 V.

    Spice internal nets:

        M1A::DI  =  9.9432977e-01 V.
        M1A::SI  =  4.8943064e-01 V.
        M1B::DI  =  9.9432977e-01 V.
        M1B::SI  =  4.8943064e-01 V.
        M2A::DI  =  9.9467684e-01 V.
        M2A::SI  =  1.7996635e+00 V.
        M2B::DI  =  9.9467684e-01 V.
        M2B::SI  =  1.7996635e+00 V.
        M2C::DI  =  7.1946169e-01 V.
        M2C::SI  =  1.7996631e+00 V.
        M2D::DI  =  1.3988429e+00 V.
        M2D::SI  =  1.7996642e+00 V.
        M3A::DI  =  7.1899933e-01 V.
        M3A::SI  =  1.2549181e-04 V.
        M3B::DI  =  3.1142338e-01 V.
        M3B::SI  =  1.2510153e-04 V.
        M4::DI   =  3.1398825e-01 V.
        M4::SI   =  1.3984623e+00 V.
        M5A::DI  =  8.4185284e-01 V.
        M5A::SI  =  2.5104560e-04 V.
        M5B::DI  =  4.8916937e-01 V.
        M5B::SI  =  2.5072138e-04 V.
        M7::DI   =  3.1389876e-01 V.
        M7::SI   =  3.1159317e-01 V.

    Voltage sources:

        VB1   =  9.0000000e-01 V,  0.0000000e+00 A,  0.000e+00 W.
        VB2   =  9.0000000e-01 V,  0.0000000e+00 A,  0.000e+00 W.
        VDD   =  1.8000000e+00 V, -1.4984540e-06 A,  2.697e-06 W.
        VIC   =  9.0000000e-01 V,  0.0000000e+00 A,  0.000e+00 W.
        VID   =  0.0000000e+00 V,  0.0000000e+00 A,  0.000e+00 W.
        EINP  =  0.0000000e+00 V,  0.0000000e+00 A,  0.000e+00 W.
        EINN  =  0.0000000e+00 V,  0.0000000e+00 A,  0.000e+00 W.

    Current sources:

    *   IB  =  5.0000000e-07  A,  9.5789611e-01  V,  4.789e-07 W.

    END_USE_OP_TAG

    * ----------------------------------------------------------------------
    * SPICE Dissipated power
    * ----------------------------------------------------------------------

        Total SPICE power    = 2.2196226e-06 W.

    * ----------------------------------------------------------------------
    * (C) Capacitors
    * ----------------------------------------------------------------------

    CL (DEFAULT, multiplicity = 1)
               VALUE = 1e-12            ,           POWER = 0                ,

    * ----------------------------------------------------------------------
    * (M) Mos transistors
    * ----------------------------------------------------------------------

    OFF:    0
    SUB:    3
    LIN:    1
    SAT:    8

    M1A (NMOS, type NMOS, model EKV 2.6, region SUB (saturation - weak inversion), multiplicity = 1):
      Vds  =  5.04899e-01,  Vgs  =  4.10569e-01,  Vbs  = -1.05534e-05
                WEFF = 2.839e-06        ,            LEFF = 7.34e-07         ,           POWER = 1.26067e-07      ,              ID = 2.49676e-07      ,
                  GM = 6.89073e-06      ,             GDS = 1.78975e-08      ,            GMBS = 1.9871e-06       ,           VDSAT = 0.118766         ,
                 VTH = 0.492154         ,          DELVTO = 0               D,              QD = -1.64503e-17     ,              QG = 9.15005e-15      ,
                  QB = -9.10132e-15     ,              QS = -3.2277e-17      ,             CGG = 4.91465e-15      ,             CGD = 7.03521e-18      ,
                 CGS = -1.28565e-15     ,             CGB = -3.63603e-15     ,             CBG = -3.62453e-15     ,             CBD = -5.17131e-18     ,
                 CBS = -3.68833e-16     ,             CBB = 3.99854e-15      ,             CDG = -4.40629e-16     ,             CDD = -6.36598e-19     ,
                 CDS = 5.65053e-16      ,             CDB = -1.23788e-16     ,            QBDJ = 1.85143e-15      ,            QBSJ = 4.13765e-20      ,
                CBDJ = 2.17576e-15      ,            CBSJ = 2.45776e-15      ,

    M1B (NMOS, type NMOS, model EKV 2.6, region SUB (saturation - weak inversion), multiplicity = 1):
      Vds  =  5.04899e-01,  Vgs  =  4.10569e-01,  Vbs  = -1.05534e-05
                WEFF = 2.839e-06        ,            LEFF = 7.34e-07         ,           POWER = 1.26067e-07      ,              ID = 2.49676e-07      ,
                  GM = 6.89073e-06      ,             GDS = 1.78975e-08      ,            GMBS = 1.9871e-06       ,           VDSAT = 0.118766         ,
                 VTH = 0.492154         ,          DELVTO = 0               D,              QD = -1.64503e-17     ,              QG = 9.15005e-15      ,
                  QB = -9.10132e-15     ,              QS = -3.2277e-17      ,             CGG = 4.91465e-15      ,             CGD = 7.03521e-18      ,
                 CGS = -1.28565e-15     ,             CGB = -3.63603e-15     ,             CBG = -3.62453e-15     ,             CBD = -5.17131e-18     ,
                 CBS = -3.68833e-16     ,             CBB = 3.99854e-15      ,             CDG = -4.40629e-16     ,             CDD = -6.36598e-19     ,
                 CDS = 5.65053e-16      ,             CDB = -1.23788e-16     ,            QBDJ = 1.85143e-15      ,            QBSJ = 4.13765e-20      ,
                CBDJ = 2.17576e-15      ,            CBSJ = 2.45776e-15      ,

    M2A (PMOS, type PMOS, model EKV 2.6, region SAT (saturation - strong inversion), multiplicity = 1):
      Vds  = -8.04987e-01,  Vgs  = -8.05323e-01,  Vbs  =  3.36513e-04
                WEFF = 3.54e-07         ,            LEFF = 5.068e-06        ,           POWER = 2.01155e-07      ,              ID = -2.49675e-07     ,
                  GM = 1.28401e-06      ,             GDS = 1.00953e-09      ,            GMBS = 4.53896e-07      ,           VDSAT = -0.358591        ,
                 VTH = -0.461891        ,          DELVTO = 0               D,              QD = 1.09483e-15      ,              QG = -1.25612e-14     ,
                  QB = 9.72845e-15      ,              QS = 1.73795e-15      ,             CGG = 1.03414e-14      ,             CGD = 1.147e-18        ,
                 CGS = -9.02103e-15     ,             CGB = -1.32147e-15     ,             CBG = -1.52136e-15     ,             CBD = -1.66707e-19     ,
                 CBS = -2.44798e-15     ,             CBB = 3.96951e-15      ,             CDG = -3.50287e-15     ,             CDD = -3.89323e-19     ,
                 CDS = 4.55237e-15      ,             CDB = -1.04911e-15     ,            QBDJ = -4.17192e-16     ,            QBSJ = -2.0006e-19      ,
                CBDJ = 4.13461e-16      ,            CBSJ = 5.32789e-16      ,

    M2B (PMOS, type PMOS, model EKV 2.6, region SAT (saturation - strong inversion), multiplicity = 1):
      Vds  = -8.04987e-01,  Vgs  = -8.05323e-01,  Vbs  =  3.36513e-04
                WEFF = 3.54e-07         ,            LEFF = 5.068e-06        ,           POWER = 2.01155e-07      ,              ID = -2.49675e-07     ,
                  GM = 1.28401e-06      ,             GDS = 1.00953e-09      ,            GMBS = 4.53896e-07      ,           VDSAT = -0.358591        ,
                 VTH = -0.461891        ,          DELVTO = 0               D,              QD = 1.09483e-15      ,              QG = -1.25612e-14     ,
                  QB = 9.72845e-15      ,              QS = 1.73795e-15      ,             CGG = 1.03414e-14      ,             CGD = 1.147e-18        ,
                 CGS = -9.02103e-15     ,             CGB = -1.32147e-15     ,             CBG = -1.52136e-15     ,             CBD = -1.66707e-19     ,
                 CBS = -2.44798e-15     ,             CBB = 3.96951e-15      ,             CDG = -3.50287e-15     ,             CDD = -3.89323e-19     ,
                 CDS = 4.55237e-15      ,             CDB = -1.04911e-15     ,            QBDJ = -4.17192e-16     ,            QBSJ = -2.0006e-19      ,
                CBDJ = 4.13461e-16      ,            CBSJ = 5.32789e-16      ,

    M2C (PMOS, type PMOS, model EKV 2.6, region SAT (saturation - strong inversion), multiplicity = 1):
      Vds  = -1.08020e+00,  Vgs  = -8.05323e-01,  Vbs  =  3.36865e-04
                WEFF = 3.54e-07         ,            LEFF = 5.068e-06        ,           POWER = 2.70152e-07      ,              ID = -2.49936e-07     ,
                  GM = 1.28534e-06      ,             GDS = 8.96768e-10      ,            GMBS = 4.54357e-07      ,           VDSAT = -0.358611        ,
                 VTH = -0.461865        ,          DELVTO = 0               D,              QD = 1.09493e-15      ,              QG = -1.25615e-14     ,
                  QB = 9.7285e-15       ,              QS = 1.7381e-15       ,             CGG = 1.03415e-14      ,             CGD = 1.06841e-18      ,
                 CGS = -9.02112e-15     ,             CGB = -1.32146e-15     ,             CBG = -1.52136e-15     ,             CBD = -1.55281e-19     ,
                 CBS = -2.44798e-15     ,             CBB = 3.96949e-15      ,             CDG = -3.50294e-15     ,             CDD = -3.62652e-19     ,
                 CDS = 4.55242e-15      ,             CDB = -1.04911e-15     ,            QBDJ = -5.40378e-16     ,            QBSJ = -2.00269e-19     ,
                CBDJ = 3.89694e-16      ,            CBSJ = 5.32789e-16      ,

    M2D (PMOS, type PMOS, model EKV 2.6, region SAT (saturation - strong inversion), multiplicity = 1):
      Vds  = -4.00821e-01,  Vgs  = -8.05324e-01,  Vbs  =  3.35816e-04
                WEFF = 3.54e-07         ,            LEFF = 5.068e-06        ,           POWER = 1.00036e-07      ,              ID = -2.49159e-07     ,
                  GM = 1.27969e-06      ,             GDS = 3.80596e-09      ,            GMBS = 4.52516e-07      ,           VDSAT = -0.358558        ,
                 VTH = -0.461933        ,          DELVTO = 0               D,              QD = 1.09522e-15      ,              QG = -1.25613e-14     ,
                  QB = 9.72823e-15      ,              QS = 1.73786e-15      ,             CGG = 1.03568e-14      ,             CGD = -2.03791e-17     ,
                 CGS = -9.01917e-15     ,             CGB = -1.31724e-15     ,             CBG = -1.51716e-15     ,             CBD = -6.07119e-18     ,
                 CBS = -2.44751e-15     ,             CBB = 3.97074e-15      ,             CDG = -3.51818e-15     ,             CDD = 2.08553e-17      ,
                 CDS = 4.55068e-15      ,             CDB = -1.05336e-15     ,            QBDJ = -2.20857e-16     ,            QBSJ = -1.99646e-19     ,
                CBDJ = 4.60251e-16      ,            CBSJ = 5.32789e-16      ,

    M3A (NMOS, type NMOS, model EKV 2.6, region SAT (saturation - strong inversion), multiplicity = 1):
      Vds  =  7.18874e-01,  Vgs  =  7.18999e-01,  Vbs  = -1.25492e-04
                WEFF = 2.39e-07         ,            LEFF = 9.412e-06        ,           POWER = 1.79737e-07      ,              ID = 2.49937e-07      ,
                  GM = 1.65033e-06      ,             GDS = 7.73343e-10      ,            GMBS = 4.74766e-07      ,           VDSAT = 0.305503         ,
                 VTH = 0.457888         ,          DELVTO = 0               D,              QD = -1.02106e-15     ,              QG = 1.33393e-14      ,
                  QB = -1.06767e-14     ,              QS = -1.64157e-15     ,             CGG = 1.25483e-14      ,             CGD = 1.49847e-18      ,
                 CGS = -1.09387e-14     ,             CGB = -1.61117e-15     ,             CBG = -1.8036e-15      ,             CBD = -2.12142e-19     ,
                 CBS = -2.69625e-15     ,             CBB = 4.50007e-15      ,             CDG = -4.25119e-15     ,             CDD = -5.08933e-19     ,
                 CDS = 5.39204e-15      ,             CDB = -1.14033e-15     ,            QBDJ = 3.83386e-16      ,            QBSJ = 7.1347e-20       ,
                CBDJ = 3.18186e-16      ,            CBSJ = 3.56396e-16      ,

    M3B (NMOS, type NMOS, model EKV 2.6, region SAT (saturation - strong inversion), multiplicity = 1):
      Vds  =  3.11298e-01,  Vgs  =  7.19000e-01,  Vbs  = -1.25102e-04
                WEFF = 2.39e-07         ,            LEFF = 9.412e-06        ,           POWER = 7.76257e-08      ,              ID = 2.4916e-07       ,
                  GM = 1.63681e-06      ,             GDS = 1.46128e-08      ,            GMBS = 4.71223e-07      ,           VDSAT = 0.305467         ,
                 VTH = 0.457935         ,          DELVTO = 0               D,              QD = -1.02346e-15     ,              QG = 1.33414e-14      ,
                  QB = -1.06759e-14     ,              QS = -1.64204e-15     ,             CGG = 1.26233e-14      ,             CGD = -1.02251e-16     ,
                 CGS = -1.09285e-14     ,             CGB = -1.59251e-15     ,             CBG = -1.78527e-15     ,             CBD = -2.58625e-17     ,
                 CBS = -2.6938e-15      ,             CBB = 4.50494e-15      ,             CDG = -4.32315e-15     ,             CDD = 9.8659e-17       ,
                 CDS = 5.38295e-15      ,             CDB = -1.15845e-15     ,            QBDJ = 1.71369e-16      ,            QBSJ = 7.11251e-20      ,
                CBDJ = 3.35288e-16      ,            CBSJ = 3.56396e-16      ,

    M4 (PMOS, type PMOS, model EKV 2.6, region SUB (saturation - weak inversion), multiplicity = 1):
      Vds  = -1.08447e+00,  Vgs  = -4.98462e-01,  Vbs  =  4.01538e-01
                WEFF = 2.654e-06        ,            LEFF = 1.08e-07         ,           POWER = 2.70232e-07      ,              ID = -2.49159e-07     ,
                  GM = 7.20083e-06      ,             GDS = 7.17316e-08      ,            GMBS = 1.83873e-06      ,           VDSAT = -0.115782        ,
                 VTH = -0.592275        ,          DELVTO = 0               D,              QD = 1.46674e-18      ,              QG = -1.69284e-15     ,
                  QB = 1.68848e-15      ,              QS = 2.89569e-18      ,             CGG = 6.14287e-16      ,             CGD = 2.77728e-18      ,
                 CGS = -1.1853e-16      ,             CGB = -4.98535e-16     ,             CBG = -4.91089e-16     ,             CBD = -2.21727e-18     ,
                 CBS = -3.53622e-17     ,             CBB = 5.28669e-16      ,             CDG = -4.1759e-17      ,             CDD = -1.8982e-19      ,
                 CDS = 5.21621e-17      ,             CDB = -1.02133e-17     ,            QBDJ = -3.57738e-15     ,            QBSJ = -1.11915e-15     ,
                CBDJ = 1.81214e-15      ,            CBSJ = 2.32381e-15      ,

    M5A (NMOS, type NMOS, model EKV 2.6, region SAT (saturation - strong inversion), multiplicity = 1):
      Vds  =  8.41602e-01,  Vgs  =  8.41853e-01,  Vbs  = -2.51046e-04
                WEFF = 2.39e-07         ,            LEFF = 9.324e-06        ,           POWER = 4.21052e-07      ,              ID = 4.99998e-07      ,
                  GM = 2.35996e-06      ,             GDS = 1.39029e-09      ,            GMBS = 6.83219e-07      ,           VDSAT = 0.393722         ,
                 VTH = 0.457929         ,          DELVTO = 0               D,              QD = -1.54356e-15     ,              QG = 1.47687e-14      ,
                  QB = -1.07904e-14     ,              QS = -2.43479e-15     ,             CGG = 1.2819e-14       ,             CGD = 1.55332e-18      ,
                 CGS = -1.13798e-14     ,             CGB = -1.44074e-15     ,             CBG = -1.69236e-15     ,             CBD = -2.02178e-19     ,
                 CBS = -2.69616e-15     ,             CBB = 4.38873e-15      ,             CDG = -4.42576e-15     ,             CDD = -5.37435e-19     ,
                 CDS = 5.59604e-15      ,             CDB = -1.16974e-15     ,            QBDJ = 4.45353e-16      ,            QBSJ = 1.42727e-19      ,
                CBDJ = 3.14275e-16      ,            CBSJ = 3.56385e-16      ,

    M5B (NMOS, type NMOS, model EKV 2.6, region SAT (saturation - strong inversion), multiplicity = 1):
      Vds  =  4.88919e-01,  Vgs  =  8.41853e-01,  Vbs  = -2.50721e-04
                WEFF = 2.39e-07         ,            LEFF = 9.324e-06        ,           POWER = 2.44394e-07      ,              ID = 4.99353e-07      ,
                  GM = 2.35614e-06      ,             GDS = 2.80426e-09      ,            GMBS = 6.82173e-07      ,           VDSAT = 0.393689         ,
                 VTH = 0.457968         ,          DELVTO = 0               D,              QD = -1.54346e-15     ,              QG = 1.47682e-14      ,
                  QB = -1.07903e-14     ,              QS = -2.43452e-15     ,             CGG = 1.28215e-14      ,             CGD = -2.01629e-18     ,
                 CGS = -1.13794e-14     ,             CGB = -1.44011e-15     ,             CBG = -1.6917e-15      ,             CBD = -1.1116e-18      ,
                 CBS = -2.69611e-15     ,             CBB = 4.38892e-15      ,             CDG = -4.42834e-15     ,             CDD = 2.99529e-18      ,
                 CDS = 5.59573e-15      ,             CDB = -1.17038e-15     ,            QBDJ = 2.652e-16        ,            QBSJ = 1.42543e-19      ,
                CBDJ = 3.26867e-16      ,            CBSJ = 3.56385e-16      ,

    M7 (NMOS, type NMOS, model EKV 2.6, region LIN (linear - strong inversion), multiplicity = 1):
      Vds  =  2.30559e-03,  Vgs  =  5.88407e-01,  Vbs  = -3.11593e-01
                WEFF = 6.69e-07         ,            LEFF = 1.04e-07         ,           POWER = 5.9693e-10       ,              ID = 2.49161e-07      ,
                  GM = 3.12971e-06      ,             GDS = 0.000105598      ,            GMBS = 6.37404e-07      ,           VDSAT = 0.157214         ,
                 VTH = 0.557081         ,          DELVTO = 0               D,              QD = -1.31674e-17     ,              QG = 3.8639e-16       ,
                  QB = -3.59892e-16     ,              QS = -1.33307e-17     ,             CGG = 3.99098e-16      ,             CGD = -1.64437e-16     ,
                 CGS = -1.69559e-16     ,             CGB = -6.51028e-17     ,             CBG = -4.96639e-17     ,             CBD = -4.03461e-17     ,
                 CBS = -4.15468e-17     ,             CBB = 1.31557e-16      ,             CDG = -1.74273e-16     ,             CDD = 1.37539e-16      ,
                 CDS = 6.9873e-17       ,             CDB = -3.31391e-17     ,            QBDJ = 3.38686e-16      ,            QBSJ = 3.36283e-16      ,
                CBDJ = 6.53243e-16      ,            CBSJ = 6.53532e-16      ,

    * ----------------------------------------------------------------------
    * (R) Resistors
    * ----------------------------------------------------------------------

Looking at the .op file, we see the output voltage is too low and is pushing M7 and M3b out of saturation. This due to the current mismatch in M2c and M2d and between M3a and M3b due to different drain voltages and finite output conductances leading to a different current flowing in M2d and M4 compared to that flowing in M3b and M7. Even if the current difference is very small, it results in a large voltage debiasing at the output because of the high output resistance provided by the cascode stages.

Therefore simulating the open-loop gain for high gain amplifiers is not easy to perform without closing the loop. There are basically two approaches to simulate the open-loop gain for high-gain amplifiers: 1) Imposing a DC offset voltage to the amplifier in open-loop configuration that brings the output voltage back to normal (for example equal to the input common-mode voltage) or 2) Simulating the closed-loop gain (for example in voltage follower mode with a feedback gain of 1) and extracting the open-loop gain from the closed loop gain according to \begin{equation*} A_{open\textsf{-}loop}(\omega)= \frac{A_{closed\textsf{-}loop}(\omega)}{1 - A_{closed\textsf{-}loop}(\omega)}, \end{equation*} where $A_{closed\textsf{-}loop}(\omega)$ is the simulated closed-loop transfer function and $A_{open\textsf{-}loop}(\omega)$, the computed open-loop transfer function. The above relation assumes that the open-loop DC gain is large enough for the input-referred offset voltage to be ignored.

The input-referred offset voltage can be extracted from the closed-loop voltage follower circuit as \begin{equation*} V_{os} = V_{in} - \left(1+\frac{1}{A}\right) \cdot V_{out} \cong V_{in} - V_{out} \quad \textsf{for $A \gg 1$}, \end{equation*} where $A \triangleq A_{open\textsf{-}loop}(0)$ is the open-loop DC gain which can be assumed to be much larger than 1. This means that, provided the DC open-loop gain is sufficiently large, the offset voltage can be measured at the amplifier differential input after imposing the proper input common-mode voltage $V_{ic}$.

We can now simulate the OTA in closed-loop as a voltage follower.

    .param VDD=1.8 Vic=0.9 Vinp=Vic Vinn=Vic Vb1=0.8 Vb2=1.0 Ib=250n
    .param CL=1p
    .param W1=2.800u L1=0.810u W2=0.300u L2=5.140u W3=0.200u L3=9.488u W4=2.600u L4=0.180u W5=0.200u L5=9.400u W7=0.630u L7=0.180u

    Starting Smash simulation...

    ----------------------------------------------------------------------
    -
    - SMASH (TM) release 7.6.0 (64-bit) of Jun 30 2020
    - Copyright (c) Dolphin Design, 1992-2020. All Rights Reserved.
    -
    ----------------------------------------------------------------------

    Output directory L:\My Drive\Lectures\Master\Fundamentals of Analog VLSI Design\2024\Jupyter Notebooks\Symmetrical OTA\Symmetrical OTA (VS)\Simulations\smash\Follower
    Parsing circuit l:\My Drive\Lectures\Master\Fundamentals of Analog VLSI Design\2024\Jupyter Notebooks\Symmetrical OTA\Symmetrical OTA (VS)\Simulations\smash\Follower\Symmetrical_OTA.pat
    Loading circuit l:\My Drive\Lectures\Master\Fundamentals of Analog VLSI Design\2024\Jupyter Notebooks\Symmetrical OTA\Symmetrical OTA (VS)\Simulations\smash\Follower\Symmetrical_OTA.pat
    Processing top-level
    Elaborating circuit...
    Elaborating circuit (creating devices)...
    Elaborating circuit (elaborating devices)...
    Elaborating circuit (logic)...
    Elaborating circuit (creating devices)...
    Elaborating circuit (elaborating devices)...
    Initializing...
    Searching for HZ nets: 0%
    Linking analog resolution matrix...
    Load completed.
    Operating Point
    Operating-Point analysis (trying logarithmic damping heuristics)...
    Iteration    1, residual  5.343e-03 on VDD
    Iteration    2, residual  4.468e-03 on VDD
    Iteration    3, residual  3.644e-03 on VDD
    Iteration    4, residual  2.877e-03 on VDD
    Iteration    5, residual  2.173e-03 on VDD
    Iteration    6, residual  1.544e-03 on VDD
    Iteration    7, residual  1.001e-03 on VDD
    Iteration    8, residual  5.638e-04 on VDD
    Iteration    9, residual  2.482e-04 on VDD
    Iteration   10, residual  1.375e-04 on M1A::SI
    Iteration   11, residual  7.256e-05 on M1A::SI
    Iteration   12, residual  3.487e-05 on M1A::SI
    Iteration   13, residual  1.568e-05 on M1A::SI
    Iteration   14, residual  1.491e-04 on M4::DI
    Iteration   15, residual  7.843e-05 on M4::DI
    Iteration   16, residual  3.771e-05 on M4::DI
    Iteration   17, residual  1.656e-05 on M4::DI
    Iteration   18, residual  6.737e-06 on M4::DI
    Iteration   19, residual  2.596e-06 on M4::DI
    Iteration   20, residual  9.562e-07 on M4::DI
    Iteration   21, residual  3.227e-07 on M4::DI
    Iteration   22, residual  8.555e-08 on M4::DI
    Iteration   23, residual  1.178e-08 on M4::DI
    Iteration   24, residual  3.165e-10 on M4::DI
    Iteration   25, residual  2.441e-13 on M4::DI

    Operating point analysis completed (converged)
    Launch Measurements: 10
    End Measurements

    CPU Time:     1s 640ms 625us
    Elapsed Time: 2s 589ms 956us

Let's have a look at the operating point information.

    Contents of the op file:
    ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾

    * ----------------------------------------------------------------------
    * Operating point information at 27 degC
    * ----------------------------------------------------------------------
    *
    * Initial state obtained by resetting everything to zero
    *
    * Convergence obtained with initial logarithmic damping heuristics
    * Number of iterations: 25
    *
    * Minimum parallel DC conductance          (.GMINDC   ): 1e-12
    * Minimum parallel transient conductance   (.GMIN     ): 1e-12
    * Minimum capacitance on analog nets       (.CAPAMIN  ): 0
    *
    * ----------------------------------------------------------------------

    * ----------------------------------------------------------------------
    * Analog nets
    * ----------------------------------------------------------------------

    Nets:

        1        =  4.8938814e-01 V.
        2        =  9.9451021e-01 V.
        3        =  7.1899281e-01 V.
        4        =  9.9417059e-01 V.
        5        =  5.0494858e-01 V.
        6        =  1.3243651e+00 V.
        8        =  8.4210389e-01 V.
        INP      =  9.0000000e-01 V.
        OUT      =  8.9993591e-01 V.
        VB1      =  8.0000000e-01 V.
        VB2      =  1.0000000e+00 V.
        VDD      =  1.8000000e+00 V.

    Spice internal nets:

        M1A::DI  =  9.9449966e-01 V.
        M1A::SI  =  4.8939869e-01 V.
        M1B::DI  =  9.9416002e-01 V.
        M1B::SI  =  4.8939871e-01 V.
        M2A::DI  =  9.9484643e-01 V.
        M2A::SI  =  1.7996638e+00 V.
        M2B::DI  =  9.9450739e-01 V.
        M2B::SI  =  1.7996632e+00 V.
        M2C::DI  =  7.1932938e-01 V.
        M2C::SI  =  1.7996634e+00 V.
        M2D::DI  =  1.3247014e+00 V.
        M2D::SI  =  1.7996637e+00 V.
        M3A::DI  =  7.1886743e-01 V.
        M3A::SI  =  1.2538252e-04 V.
        M3B::DI  =  5.0482329e-01 V.
        M3B::SI  =  1.2528664e-04 V.
        M4::DI   =  8.9998077e-01 V.
        M4::SI   =  1.3243202e+00 V.
        M5A::DI  =  8.4185284e-01 V.
        M5A::SI  =  2.5104560e-04 V.
        M5B::DI  =  4.8913742e-01 V.
        M5B::SI  =  2.5072134e-04 V.
        M7::DI   =  8.9989115e-01 V.
        M7::SI   =  5.0499334e-01 V.

    Voltage sources:

        VB1  =  8.0000000e-01 V,  0.0000000e+00 A,  0.000e+00 W.
        VB2  =  1.0000000e+00 V,  0.0000000e+00 A,  0.000e+00 W.
        VDD  =  1.8000000e+00 V, -1.4986059e-06 A,  2.697e-06 W.
        VIN  =  9.0000000e-01 V,  0.0000000e+00 A,  0.000e+00 W.

    Current sources:

    *   IB  =  5.0000000e-07  A,  9.5789611e-01  V,  4.789e-07 W.

    END_USE_OP_TAG

    * ----------------------------------------------------------------------
    * SPICE Dissipated power
    * ----------------------------------------------------------------------

        Total SPICE power    = 2.2198964e-06 W.

    * ----------------------------------------------------------------------
    * (C) Capacitors
    * ----------------------------------------------------------------------

    CL (DEFAULT, multiplicity = 1)
               VALUE = 1e-12            ,           POWER = 0                ,

    * ----------------------------------------------------------------------
    * (M) Mos transistors
    * ----------------------------------------------------------------------

    OFF:    0
    SUB:    4
    LIN:    0
    SAT:    8

    M1A (NMOS, type NMOS, model EKV 2.6, region SUB (saturation - weak inversion), multiplicity = 1):
      Vds  =  5.05101e-01,  Vgs  =  4.10537e-01,  Vbs  = -1.05442e-05
                WEFF = 2.839e-06        ,            LEFF = 7.34e-07         ,           POWER = 1.26007e-07      ,              ID = 2.49458e-07      ,
                  GM = 6.88514e-06      ,             GDS = 1.78793e-08      ,            GMBS = 1.98551e-06      ,           VDSAT = 0.118759         ,
                 VTH = 0.492154         ,          DELVTO = 0               D,              QD = -1.64362e-17     ,              QG = 9.14989e-15      ,
                  QB = -9.10121e-15     ,              QS = -3.22499e-17     ,             CGG = 4.91393e-15      ,             CGD = 7.03361e-18      ,
                 CGS = -1.28469e-15     ,             CGB = -3.63628e-15     ,             CBG = -3.62478e-15     ,             CBD = -5.17125e-18     ,
                 CBS = -3.68568e-16     ,             CBB = 3.99852e-15      ,             CDG = -4.40292e-16     ,             CDD = -6.36061e-19     ,
                 CDS = 5.64624e-16      ,             CDB = -1.23695e-16     ,            QBDJ = 1.85213e-15      ,            QBSJ = 4.13404e-20      ,
                CBDJ = 2.17568e-15      ,            CBSJ = 2.45776e-15      ,

    M1B (NMOS, type NMOS, model EKV 2.6, region SUB (saturation - weak inversion), multiplicity = 1):
      Vds  =  5.04761e-01,  Vgs  =  4.10601e-01,  Vbs  = -1.05626e-05
                WEFF = 2.839e-06        ,            LEFF = 7.34e-07         ,           POWER = 1.26142e-07      ,              ID = 2.49894e-07      ,
                  GM = 6.89631e-06      ,             GDS = 1.79147e-08      ,            GMBS = 1.98868e-06      ,           VDSAT = 0.118772         ,
                 VTH = 0.492155         ,          DELVTO = 0               D,              QD = -1.64642e-17     ,              QG = 9.15021e-15      ,
                  QB = -9.10144e-15     ,              QS = -3.23039e-17     ,             CGG = 4.91536e-15      ,             CGD = 7.03666e-18      ,
                 CGS = -1.28661e-15     ,             CGB = -3.63578e-15     ,             CBG = -3.62429e-15     ,             CBD = -5.17126e-18     ,
                 CBS = -3.69097e-16     ,             CBB = 3.99855e-15      ,             CDG = -4.40964e-16     ,             CDD = -6.3712e-19      ,
                 CDS = 5.65482e-16      ,             CDB = -1.23881e-16     ,            QBDJ = 1.85095e-15      ,            QBSJ = 4.14126e-20      ,
                CBDJ = 2.17581e-15      ,            CBSJ = 2.45776e-15      ,

    M2A (PMOS, type PMOS, model EKV 2.6, region SAT (saturation - strong inversion), multiplicity = 1):
      Vds  = -8.04817e-01,  Vgs  = -8.05154e-01,  Vbs  =  3.36219e-04
                WEFF = 3.54e-07         ,            LEFF = 5.068e-06        ,           POWER = 2.00937e-07      ,              ID = -2.49458e-07     ,
                  GM = 1.28345e-06      ,             GDS = 1.00874e-09      ,            GMBS = 4.53684e-07      ,           VDSAT = -0.358471        ,
                 VTH = -0.461891        ,          DELVTO = 0               D,              QD = 1.09424e-15      ,              QG = -1.25595e-14     ,
                  QB = 9.72819e-15      ,              QS = 1.73705e-15      ,             CGG = 1.0341e-14       ,             CGD = 1.14695e-18      ,
                 CGS = -9.02049e-15     ,             CGB = -1.32164e-15     ,             CBG = -1.52146e-15     ,             CBD = -1.66717e-19     ,
                 CBS = -2.44796e-15     ,             CBB = 3.96959e-15      ,             CDG = -3.50267e-15     ,             CDD = -3.89298e-19     ,
                 CDS = 4.55213e-15      ,             CDB = -1.04907e-15     ,            QBDJ = -4.17113e-16     ,            QBSJ = -1.99886e-19     ,
                CBDJ = 4.13477e-16      ,            CBSJ = 5.32789e-16      ,

    M2B (PMOS, type PMOS, model EKV 2.6, region SAT (saturation - strong inversion), multiplicity = 1):
      Vds  = -8.05156e-01,  Vgs  = -8.05493e-01,  Vbs  =  3.36806e-04
                WEFF = 3.54e-07         ,            LEFF = 5.068e-06        ,           POWER = 2.01372e-07      ,              ID = -2.49893e-07     ,
                  GM = 1.28456e-06      ,             GDS = 1.01033e-09      ,            GMBS = 4.54107e-07      ,           VDSAT = -0.358711        ,
                 VTH = -0.461891        ,          DELVTO = 0               D,              QD = 1.09543e-15      ,              QG = -1.2563e-14      ,
                  QB = 9.72871e-15      ,              QS = 1.73885e-15      ,             CGG = 1.03417e-14      ,             CGD = 1.14705e-18      ,
                 CGS = -9.02156e-15     ,             CGB = -1.3213e-15      ,             CBG = -1.52127e-15     ,             CBD = -1.66697e-19     ,
                 CBS = -2.44799e-15     ,             CBB = 3.96942e-15      ,             CDG = -3.50308e-15     ,             CDD = -3.89348e-19     ,
                 CDS = 4.55262e-15      ,             CDB = -1.04915e-15     ,            QBDJ = -4.1727e-16      ,            QBSJ = -2.00234e-19     ,
                CBDJ = 4.13444e-16      ,            CBSJ = 5.32789e-16      ,

    M2C (PMOS, type PMOS, model EKV 2.6, region SAT (saturation - strong inversion), multiplicity = 1):
      Vds  = -1.08033e+00,  Vgs  = -8.05153e-01,  Vbs  =  3.36572e-04
                WEFF = 3.54e-07         ,            LEFF = 5.068e-06        ,           POWER = 2.6995e-07       ,              ID = -2.49719e-07     ,
                  GM = 1.28479e-06      ,             GDS = 8.95951e-10      ,            GMBS = 4.54145e-07      ,           VDSAT = -0.358491        ,
                 VTH = -0.461865        ,          DELVTO = 0               D,              QD = 1.09434e-15      ,              QG = -1.25598e-14     ,
                  QB = 9.72824e-15      ,              QS = 1.7372e-15       ,             CGG = 1.03411e-14      ,             CGD = 1.06828e-18      ,
                 CGS = -9.02058e-15     ,             CGB = -1.32163e-15     ,             CBG = -1.52146e-15     ,             CBD = -1.55278e-19     ,
                 CBS = -2.44796e-15     ,             CBB = 3.96958e-15      ,             CDG = -3.50273e-15     ,             CDD = -3.626e-19       ,
                 CDS = 4.55217e-15      ,             CDB = -1.04907e-15     ,            QBDJ = -5.40436e-16     ,            QBSJ = -2.00095e-19     ,
                CBDJ = 3.89684e-16      ,            CBSJ = 5.32789e-16      ,

    M2D (PMOS, type PMOS, model EKV 2.6, region SAT (saturation - strong inversion), multiplicity = 1):
      Vds  = -4.74962e-01,  Vgs  = -8.05493e-01,  Vbs  =  3.36315e-04
                WEFF = 3.54e-07         ,            LEFF = 5.068e-06        ,           POWER = 1.18685e-07      ,              ID = -2.49529e-07     ,
                  GM = 1.28259e-06      ,             GDS = 1.33944e-09      ,            GMBS = 4.5343e-07       ,           VDSAT = -0.358684        ,
                 VTH = -0.461925        ,          DELVTO = 0               D,              QD = 1.09532e-15      ,              QG = -1.25626e-14     ,
                  QB = 9.72864e-15      ,              QS = 1.73866e-15      ,             CGG = 1.03424e-14      ,             CGD = 1.27985e-20      ,
                 CGS = -9.02135e-15     ,             CGB = -1.32109e-15     ,             CBG = -1.52103e-15     ,             CBD = -5.25166e-19     ,
                 CBS = -2.44796e-15     ,             CBB = 3.96951e-15      ,             CDG = -3.50389e-15     ,             CDD = 8.03607e-19      ,
                 CDS = 4.55247e-15      ,             CDB = -1.04939e-15     ,            QBDJ = -2.58512e-16     ,            QBSJ = -1.99942e-19     ,
                CBDJ = 4.50244e-16      ,            CBSJ = 5.32789e-16      ,

    M3A (NMOS, type NMOS, model EKV 2.6, region SAT (saturation - strong inversion), multiplicity = 1):
      Vds  =  7.18742e-01,  Vgs  =  7.18867e-01,  Vbs  = -1.25383e-04
                WEFF = 2.39e-07         ,            LEFF = 9.412e-06        ,           POWER = 1.79548e-07      ,              ID = 2.49719e-07      ,
                  GM = 1.64957e-06      ,             GDS = 7.72785e-10      ,            GMBS = 4.74545e-07      ,           VDSAT = 0.30541          ,
                 VTH = 0.457888         ,          DELVTO = 0               D,              QD = -1.0205e-15      ,              QG = 1.33377e-14      ,
                  QB = -1.06764e-14     ,              QS = -1.64072e-15     ,             CGG = 1.25477e-14      ,             CGD = 1.49839e-18      ,
                 CGS = -1.09378e-14     ,             CGB = -1.61139e-15     ,             CBG = -1.80375e-15     ,             CBD = -2.12158e-19     ,
                 CBS = -2.69617e-15     ,             CBB = 4.50013e-15      ,             CDG = -4.25086e-15     ,             CDD = -5.0889e-19      ,
                 CDS = 5.39163e-15      ,             CDB = -1.14026e-15     ,            QBDJ = 3.83319e-16      ,            QBSJ = 7.12849e-20      ,
                CBDJ = 3.1819e-16       ,            CBSJ = 3.56396e-16      ,

    M3B (NMOS, type NMOS, model EKV 2.6, region SAT (saturation - strong inversion), multiplicity = 1):
      Vds  =  5.04698e-01,  Vgs  =  7.18868e-01,  Vbs  = -1.25287e-04
                WEFF = 2.39e-07         ,            LEFF = 9.412e-06        ,           POWER = 1.26e-07         ,              ID = 2.49529e-07      ,
                  GM = 1.64825e-06      ,             GDS = 1.04493e-09      ,            GMBS = 4.74178e-07      ,           VDSAT = 0.305392         ,
                 VTH = 0.457912         ,          DELVTO = 0               D,              QD = -1.02038e-15     ,              QG = 1.33373e-14      ,
                  QB = -1.06764e-14     ,              QS = -1.64055e-15     ,             CGG = 1.25475e-14      ,             CGD = 1.54003e-18      ,
                 CGS = -1.09377e-14     ,             CGB = -1.61142e-15     ,             CBG = -1.80376e-15     ,             CBD = -2.41859e-19     ,
                 CBS = -2.69615e-15     ,             CBB = 4.50015e-15      ,             CDG = -4.2508e-15      ,             CDD = -4.8523e-19      ,
                 CDS = 5.39154e-15      ,             CDB = -1.14026e-15     ,            QBDJ = 2.73355e-16      ,            QBSJ = 7.12304e-20      ,
                CBDJ = 3.26207e-16      ,            CBSJ = 3.56396e-16      ,

    M4 (PMOS, type PMOS, model EKV 2.6, region SUB (saturation - weak inversion), multiplicity = 1):
      Vds  = -4.24339e-01,  Vgs  = -5.24320e-01,  Vbs  =  4.75680e-01
                WEFF = 2.654e-06        ,            LEFF = 1.08e-07         ,           POWER = 1.05909e-07      ,              ID = -2.4953e-07      ,
                  GM = 7.19631e-06      ,             GDS = 8.57972e-08      ,            GMBS = 1.78042e-06      ,           VDSAT = -0.116706        ,
                 VTH = -0.612627        ,          DELVTO = 0               D,              QD = 1.6786e-18       ,              QG = -1.74317e-15     ,
                  QB = 1.73819e-15      ,              QS = 3.30793e-18      ,             CGG = 6.1581e-16       ,             CGD = 3.27946e-18      ,
                 CGS = -1.35117e-16     ,             CGB = -4.83972e-16     ,             CBG = -4.75969e-16     ,             CBD = -2.53111e-18     ,
                 CBS = -3.86408e-17     ,             CBB = 5.1714e-16       ,             CDG = -4.75076e-17     ,             CDD = -2.54226e-19     ,
                 CDS = 5.90287e-17      ,             CDB = -1.12669e-17     ,            QBDJ = -2.32485e-15     ,            QBSJ = -1.30919e-15     ,
                CBDJ = 2.03398e-15      ,            CBSJ = 2.27145e-15      ,

    M5A (NMOS, type NMOS, model EKV 2.6, region SAT (saturation - strong inversion), multiplicity = 1):
      Vds  =  8.41602e-01,  Vgs  =  8.41853e-01,  Vbs  = -2.51046e-04
                WEFF = 2.39e-07         ,            LEFF = 9.324e-06        ,           POWER = 4.21052e-07      ,              ID = 4.99998e-07      ,
                  GM = 2.35996e-06      ,             GDS = 1.39029e-09      ,            GMBS = 6.83219e-07      ,           VDSAT = 0.393722         ,
                 VTH = 0.457929         ,          DELVTO = 0               D,              QD = -1.54356e-15     ,              QG = 1.47687e-14      ,
                  QB = -1.07904e-14     ,              QS = -2.43479e-15     ,             CGG = 1.2819e-14       ,             CGD = 1.55332e-18      ,
                 CGS = -1.13798e-14     ,             CGB = -1.44074e-15     ,             CBG = -1.69236e-15     ,             CBD = -2.02178e-19     ,
                 CBS = -2.69616e-15     ,             CBB = 4.38873e-15      ,             CDG = -4.42576e-15     ,             CDD = -5.37435e-19     ,
                 CDS = 5.59604e-15      ,             CDB = -1.16974e-15     ,            QBDJ = 4.45353e-16      ,            QBSJ = 1.42727e-19      ,
                CBDJ = 3.14275e-16      ,            CBSJ = 3.56385e-16      ,

    M5B (NMOS, type NMOS, model EKV 2.6, region SAT (saturation - strong inversion), multiplicity = 1):
      Vds  =  4.88887e-01,  Vgs  =  8.41853e-01,  Vbs  = -2.50721e-04
                WEFF = 2.39e-07         ,            LEFF = 9.324e-06        ,           POWER = 2.44378e-07      ,              ID = 4.99353e-07      ,
                  GM = 2.35614e-06      ,             GDS = 2.80502e-09      ,            GMBS = 6.82173e-07      ,           VDSAT = 0.393689         ,
                 VTH = 0.457968         ,          DELVTO = 0               D,              QD = -1.54346e-15     ,              QG = 1.47682e-14      ,
                  QB = -1.07903e-14     ,              QS = -2.43452e-15     ,             CGG = 1.28215e-14      ,             CGD = -2.02089e-18     ,
                 CGS = -1.13794e-14     ,             CGB = -1.44011e-15     ,             CBG = -1.6917e-15      ,             CBD = -1.11269e-18     ,
                 CBS = -2.69611e-15     ,             CBB = 4.38892e-15      ,             CDG = -4.42835e-15     ,             CDD = 2.99971e-18      ,
                 CDS = 5.59573e-15      ,             CDB = -1.17038e-15     ,            QBDJ = 2.65184e-16      ,            QBSJ = 1.42543e-19      ,
                CBDJ = 3.26868e-16      ,            CBSJ = 3.56385e-16      ,

    M7 (NMOS, type NMOS, model EKV 2.6, region SUB (saturation - weak inversion), multiplicity = 1):
      Vds  =  3.94898e-01,  Vgs  =  4.95007e-01,  Vbs  = -5.04993e-01
                WEFF = 6.69e-07         ,            LEFF = 1.04e-07         ,           POWER = 9.85623e-08      ,              ID = 2.4953e-07       ,
                  GM = 7.47558e-06      ,             GDS = 1.58128e-07      ,            GMBS = 1.37673e-06      ,           VDSAT = 0.115334         ,
                 VTH = 0.586526         ,          DELVTO = 0               D,              QD = -3.29577e-19     ,              QG = 3.78115e-16      ,
                  QB = -3.77134e-16     ,              QS = -6.51021e-19     ,             CGG = 1.3555e-16       ,             CGD = 1.50937e-18      ,
                 CGS = -2.675e-17       ,             CGB = -1.10309e-16     ,             CBG = -1.0654e-16      ,             CBD = -1.18444e-18     ,
                 CBS = -7.77372e-18     ,             CBB = 1.15498e-16      ,             CDG = -9.82633e-18     ,             CDD = -1.1006e-19      ,
                 CDS = 1.16939e-17      ,             CDB = -1.75747e-18     ,            QBDJ = 9.21941e-16      ,            QBSJ = 5.34466e-16      ,
                CBDJ = 6.00144e-16      ,            CBSJ = 6.32083e-16      ,

    * ----------------------------------------------------------------------
    * (R) Resistors
    * ----------------------------------------------------------------------

We see that now all the transistors are biased in saturation and that the quiescent output voltage $V_{outq}$ is very close to the input common-mode voltage.

$V_{outq} =$ 899.936 mV

The difference is actually the offset voltage $V_{os}$.

$V_{os} =$ 64.093 µV

We can apply this offset voltage to the open-loop circuit and check the operating point.

    .param VDD=1.8 Vic=0.9 Vinp=Vic Vinn=Vic Vos=64.093u Vb1=0.8 Vb2=1.0 Ib=250n
    .param CL=1p
    .param W1=2.800u L1=0.810u W2=0.300u L2=5.140u W3=0.200u L3=9.488u W4=2.600u L4=0.180u W5=0.200u L5=9.400u W7=0.630u L7=0.180u

    Starting Smash simulation...

    ----------------------------------------------------------------------
    -
    - SMASH (TM) release 7.6.0 (64-bit) of Jun 30 2020
    - Copyright (c) Dolphin Design, 1992-2020. All Rights Reserved.
    -
    ----------------------------------------------------------------------

    Output directory L:\My Drive\Lectures\Master\Fundamentals of Analog VLSI Design\2024\Jupyter Notebooks\Symmetrical OTA\Symmetrical OTA (VS)\Simulations\smash\Gain
    Parsing circuit l:\My Drive\Lectures\Master\Fundamentals of Analog VLSI Design\2024\Jupyter Notebooks\Symmetrical OTA\Symmetrical OTA (VS)\Simulations\smash\Gain\Symmetrical_OTA.pat
    Loading circuit l:\My Drive\Lectures\Master\Fundamentals of Analog VLSI Design\2024\Jupyter Notebooks\Symmetrical OTA\Symmetrical OTA (VS)\Simulations\smash\Gain\Symmetrical_OTA.pat
    Processing top-level
    Elaborating circuit...
    Elaborating circuit (creating devices)...
    Elaborating circuit (elaborating devices)...
    Elaborating circuit (logic)...
    Elaborating circuit (creating devices)...
    Elaborating circuit (elaborating devices)...
    Initializing...
    Searching for HZ nets: 0%
    Linking analog resolution matrix...
    Load completed.
    Operating Point
    Operating-Point analysis (trying logarithmic damping heuristics)...
    Iteration    1, residual  9.000e-01 on EINP
    Iteration    2, residual  6.698e-01 on EINP
    Iteration    3, residual  4.657e-01 on EINP
    Iteration    4, residual  2.924e-01 on EINP
    Iteration    5, residual  1.557e-01 on EINP
    Iteration    6, residual  6.181e-02 on EINP
    Iteration    7, residual  1.368e-02 on EINP
    Iteration    8, residual  8.587e-04 on EINP
    Iteration    9, residual  2.481e-04 on VDD
    Iteration   10, residual  6.784e-05 on VDD
    Iteration   11, residual  6.744e-06 on VDD
    Iteration   12, residual  1.021e-07 on M7::DI
    Iteration   13, residual  1.745e-07 on M7::DI
    Iteration   14, residual  1.656e-07 on M7::DI
    Iteration   15, residual  1.104e-07 on M7::DI
    Iteration   16, residual  7.071e-08 on M7::DI
    Iteration   17, residual  3.078e-08 on M7::DI
    Iteration   18, residual  9.829e-09 on M7::DI
    Iteration   19, residual  2.161e-09 on M7::DI
    Iteration   20, residual  1.343e-10 on M7::DI
    Iteration   21, residual  5.679e-13 on M7::DI
    Iteration   22, residual  1.035e-17 on M7::DI

    Operating point analysis completed (converged)

    CPU Time:     1s 593ms 750us
    Elapsed Time: 2s 417ms 363us

    Contents of the op file:
    ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾

    * ----------------------------------------------------------------------
    * Operating point information at 27 degC
    * ----------------------------------------------------------------------
    *
    * Initial state obtained by resetting everything to zero
    *
    * Convergence obtained with initial logarithmic damping heuristics
    * Number of iterations: 22
    *
    * Minimum parallel DC conductance          (.GMINDC   ): 1e-12
    * Minimum parallel transient conductance   (.GMIN     ): 1e-12
    * Minimum capacitance on analog nets       (.CAPAMIN  ): 0
    *
    * ----------------------------------------------------------------------

    * ----------------------------------------------------------------------
    * Analog nets
    * ----------------------------------------------------------------------

    Nets:

        1        =  4.8942010e-01 V.
        2        =  9.9451018e-01 V.
        3        =  7.1899284e-01 V.
        4        =  9.9417055e-01 V.
        5        =  5.0494995e-01 V.
        6        =  1.3243658e+00 V.
        8        =  8.4210389e-01 V.
        IC       =  9.0000000e-01 V.
        ID       =  6.4093000e-05 V.
        INN      =  8.9996795e-01 V.
        INP      =  9.0003205e-01 V.
        OUT      =  9.0001411e-01 V.
        VB1      =  8.0000000e-01 V.
        VB2      =  1.0000000e+00 V.
        VDD      =  1.8000000e+00 V.

    Spice internal nets:

        M1A::DI  =  9.9449963e-01 V.
        M1A::SI  =  4.8943065e-01 V.
        M1B::DI  =  9.9415999e-01 V.
        M1B::SI  =  4.8943066e-01 V.
        M2A::DI  =  9.9484640e-01 V.
        M2A::SI  =  1.7996638e+00 V.
        M2B::DI  =  9.9450736e-01 V.
        M2B::SI  =  1.7996632e+00 V.
        M2C::DI  =  7.1932941e-01 V.
        M2C::SI  =  1.7996634e+00 V.
        M2D::DI  =  1.3247021e+00 V.
        M2D::SI  =  1.7996637e+00 V.
        M3A::DI  =  7.1886745e-01 V.
        M3A::SI  =  1.2538254e-04 V.
        M3B::DI  =  5.0482466e-01 V.
        M3B::SI  =  1.2528667e-04 V.
        M4::DI   =  9.0005897e-01 V.
        M4::SI   =  1.3243210e+00 V.
        M5A::DI  =  8.4185284e-01 V.
        M5A::SI  =  2.5104560e-04 V.
        M5B::DI  =  4.8916938e-01 V.
        M5B::SI  =  2.5072138e-04 V.
        M7::DI   =  8.9996935e-01 V.
        M7::SI   =  5.0499471e-01 V.

    Voltage sources:

        VB1   =  8.0000000e-01 V,  0.0000000e+00 A,  0.000e+00 W.
        VB2   =  1.0000000e+00 V,  0.0000000e+00 A,  0.000e+00 W.
        VDD   =  1.8000000e+00 V, -1.4986060e-06 A,  2.697e-06 W.
        VIC   =  9.0000000e-01 V,  0.0000000e+00 A,  0.000e+00 W.
        VID   =  6.4093000e-05 V,  0.0000000e+00 A,  0.000e+00 W.
        EINP  =  3.2046500e-05 V,  0.0000000e+00 A,  0.000e+00 W.
        EINN  = -3.2046500e-05 V,  0.0000000e+00 A,  0.000e+00 W.

    Current sources:

    *   IB  =  5.0000000e-07  A,  9.5789611e-01  V,  4.789e-07 W.

    END_USE_OP_TAG

    * ----------------------------------------------------------------------
    * SPICE Dissipated power
    * ----------------------------------------------------------------------

        Total SPICE power    = 2.2198967e-06 W.

    * ----------------------------------------------------------------------
    * (C) Capacitors
    * ----------------------------------------------------------------------

    CL (DEFAULT, multiplicity = 1)
               VALUE = 1e-12            ,           POWER = 0                ,

    * ----------------------------------------------------------------------
    * (M) Mos transistors
    * ----------------------------------------------------------------------

    OFF:    0
    SUB:    4
    LIN:    0
    SAT:    8

    M1A (NMOS, type NMOS, model EKV 2.6, region SUB (saturation - weak inversion), multiplicity = 1):
      Vds  =  5.05069e-01,  Vgs  =  4.10537e-01,  Vbs  = -1.05442e-05
                WEFF = 2.839e-06        ,            LEFF = 7.34e-07         ,           POWER = 1.25999e-07      ,              ID = 2.49458e-07      ,
                  GM = 6.88514e-06      ,             GDS = 1.78797e-08      ,            GMBS = 1.98551e-06      ,           VDSAT = 0.118759         ,
                 VTH = 0.492154         ,          DELVTO = 0               D,              QD = -1.64363e-17     ,              QG = 9.14989e-15      ,
                  QB = -9.10121e-15     ,              QS = -3.22499e-17     ,             CGG = 4.91393e-15      ,             CGD = 7.03369e-18      ,
                 CGS = -1.28469e-15     ,             CGB = -3.63628e-15     ,             CBG = -3.62478e-15     ,             CBD = -5.1713e-18      ,
                 CBS = -3.68568e-16     ,             CBB = 3.99852e-15      ,             CDG = -4.40293e-16     ,             CDD = -6.36069e-19     ,
                 CDS = 5.64624e-16      ,             CDB = -1.23695e-16     ,            QBDJ = 1.85202e-15      ,            QBSJ = 4.13405e-20      ,
                CBDJ = 2.17569e-15      ,            CBSJ = 2.45776e-15      ,

    M1B (NMOS, type NMOS, model EKV 2.6, region SUB (saturation - weak inversion), multiplicity = 1):
      Vds  =  5.04729e-01,  Vgs  =  4.10601e-01,  Vbs  = -1.05626e-05
                WEFF = 2.839e-06        ,            LEFF = 7.34e-07         ,           POWER = 1.26134e-07      ,              ID = 2.49894e-07      ,
                  GM = 6.89631e-06      ,             GDS = 1.79152e-08      ,            GMBS = 1.98868e-06      ,           VDSAT = 0.118772         ,
                 VTH = 0.492155         ,          DELVTO = 0               D,              QD = -1.64643e-17     ,              QG = 9.15021e-15      ,
                  QB = -9.10144e-15     ,              QS = -3.2304e-17      ,             CGG = 4.91536e-15      ,             CGD = 7.03673e-18      ,
                 CGS = -1.28661e-15     ,             CGB = -3.63578e-15     ,             CBG = -3.62429e-15     ,             CBD = -5.17132e-18     ,
                 CBS = -3.69097e-16     ,             CBB = 3.99855e-15      ,             CDG = -4.40964e-16     ,             CDD = -6.37127e-19     ,
                 CDS = 5.65482e-16      ,             CDB = -1.23881e-16     ,            QBDJ = 1.85084e-15      ,            QBSJ = 4.14126e-20      ,
                CBDJ = 2.17582e-15      ,            CBSJ = 2.45776e-15      ,

    M2A (PMOS, type PMOS, model EKV 2.6, region SAT (saturation - strong inversion), multiplicity = 1):
      Vds  = -8.04817e-01,  Vgs  = -8.05154e-01,  Vbs  =  3.36219e-04
                WEFF = 3.54e-07         ,            LEFF = 5.068e-06        ,           POWER = 2.00937e-07      ,              ID = -2.49458e-07     ,
                  GM = 1.28346e-06      ,             GDS = 1.00874e-09      ,            GMBS = 4.53684e-07      ,           VDSAT = -0.358471        ,
                 VTH = -0.461891        ,          DELVTO = 0               D,              QD = 1.09424e-15      ,              QG = -1.25595e-14     ,
                  QB = 9.72819e-15      ,              QS = 1.73705e-15      ,             CGG = 1.0341e-14       ,             CGD = 1.14695e-18      ,
                 CGS = -9.02049e-15     ,             CGB = -1.32164e-15     ,             CBG = -1.52146e-15     ,             CBD = -1.66717e-19     ,
                 CBS = -2.44796e-15     ,             CBB = 3.96959e-15      ,             CDG = -3.50267e-15     ,             CDD = -3.89298e-19     ,
                 CDS = 4.55213e-15      ,             CDB = -1.04907e-15     ,            QBDJ = -4.17113e-16     ,            QBSJ = -1.99886e-19     ,
                CBDJ = 4.13477e-16      ,            CBSJ = 5.32789e-16      ,

    M2B (PMOS, type PMOS, model EKV 2.6, region SAT (saturation - strong inversion), multiplicity = 1):
      Vds  = -8.05156e-01,  Vgs  = -8.05493e-01,  Vbs  =  3.36806e-04
                WEFF = 3.54e-07         ,            LEFF = 5.068e-06        ,           POWER = 2.01372e-07      ,              ID = -2.49893e-07     ,
                  GM = 1.28456e-06      ,             GDS = 1.01033e-09      ,            GMBS = 4.54107e-07      ,           VDSAT = -0.358711        ,
                 VTH = -0.461891        ,          DELVTO = 0               D,              QD = 1.09543e-15      ,              QG = -1.2563e-14      ,
                  QB = 9.72871e-15      ,              QS = 1.73885e-15      ,             CGG = 1.03417e-14      ,             CGD = 1.14705e-18      ,
                 CGS = -9.02156e-15     ,             CGB = -1.3213e-15      ,             CBG = -1.52127e-15     ,             CBD = -1.66697e-19     ,
                 CBS = -2.44799e-15     ,             CBB = 3.96942e-15      ,             CDG = -3.50308e-15     ,             CDD = -3.89348e-19     ,
                 CDS = 4.55262e-15      ,             CDB = -1.04915e-15     ,            QBDJ = -4.1727e-16      ,            QBSJ = -2.00234e-19     ,
                CBDJ = 4.13444e-16      ,            CBSJ = 5.32789e-16      ,

    M2C (PMOS, type PMOS, model EKV 2.6, region SAT (saturation - strong inversion), multiplicity = 1):
      Vds  = -1.08033e+00,  Vgs  = -8.05153e-01,  Vbs  =  3.36572e-04
                WEFF = 3.54e-07         ,            LEFF = 5.068e-06        ,           POWER = 2.6995e-07       ,              ID = -2.49719e-07     ,
                  GM = 1.28479e-06      ,             GDS = 8.95951e-10      ,            GMBS = 4.54145e-07      ,           VDSAT = -0.358491        ,
                 VTH = -0.461865        ,          DELVTO = 0               D,              QD = 1.09434e-15      ,              QG = -1.25598e-14     ,
                  QB = 9.72824e-15      ,              QS = 1.7372e-15       ,             CGG = 1.03411e-14      ,             CGD = 1.06828e-18      ,
                 CGS = -9.02058e-15     ,             CGB = -1.32163e-15     ,             CBG = -1.52146e-15     ,             CBD = -1.55278e-19     ,
                 CBS = -2.44796e-15     ,             CBB = 3.96958e-15      ,             CDG = -3.50273e-15     ,             CDD = -3.626e-19       ,
                 CDS = 4.55217e-15      ,             CDB = -1.04907e-15     ,            QBDJ = -5.40436e-16     ,            QBSJ = -2.00095e-19     ,
                CBDJ = 3.89684e-16      ,            CBSJ = 5.32789e-16      ,

    M2D (PMOS, type PMOS, model EKV 2.6, region SAT (saturation - strong inversion), multiplicity = 1):
      Vds  = -4.74962e-01,  Vgs  = -8.05493e-01,  Vbs  =  3.36315e-04
                WEFF = 3.54e-07         ,            LEFF = 5.068e-06        ,           POWER = 1.18685e-07      ,              ID = -2.49529e-07     ,
                  GM = 1.28259e-06      ,             GDS = 1.33945e-09      ,            GMBS = 4.5343e-07       ,           VDSAT = -0.358684        ,
                 VTH = -0.461925        ,          DELVTO = 0               D,              QD = 1.09532e-15      ,              QG = -1.25626e-14     ,
                  QB = 9.72864e-15      ,              QS = 1.73866e-15      ,             CGG = 1.03424e-14      ,             CGD = 1.27614e-20      ,
                 CGS = -9.02135e-15     ,             CGB = -1.32109e-15     ,             CBG = -1.52103e-15     ,             CBD = -5.25176e-19     ,
                 CBS = -2.44796e-15     ,             CBB = 3.96951e-15      ,             CDG = -3.50389e-15     ,             CDD = 8.03643e-19      ,
                 CDS = 4.55247e-15      ,             CDB = -1.04939e-15     ,            QBDJ = -2.58512e-16     ,            QBSJ = -1.99942e-19     ,
                CBDJ = 4.50244e-16      ,            CBSJ = 5.32789e-16      ,

    M3A (NMOS, type NMOS, model EKV 2.6, region SAT (saturation - strong inversion), multiplicity = 1):
      Vds  =  7.18742e-01,  Vgs  =  7.18867e-01,  Vbs  = -1.25383e-04
                WEFF = 2.39e-07         ,            LEFF = 9.412e-06        ,           POWER = 1.79548e-07      ,              ID = 2.4972e-07       ,
                  GM = 1.64957e-06      ,             GDS = 7.72785e-10      ,            GMBS = 4.74545e-07      ,           VDSAT = 0.30541          ,
                 VTH = 0.457888         ,          DELVTO = 0               D,              QD = -1.0205e-15      ,              QG = 1.33377e-14      ,
                  QB = -1.06764e-14     ,              QS = -1.64072e-15     ,             CGG = 1.25477e-14      ,             CGD = 1.49839e-18      ,
                 CGS = -1.09378e-14     ,             CGB = -1.61139e-15     ,             CBG = -1.80375e-15     ,             CBD = -2.12158e-19     ,
                 CBS = -2.69617e-15     ,             CBB = 4.50013e-15      ,             CDG = -4.25086e-15     ,             CDD = -5.0889e-19      ,
                 CDS = 5.39163e-15      ,             CDB = -1.14026e-15     ,            QBDJ = 3.83319e-16      ,            QBSJ = 7.12849e-20      ,
                CBDJ = 3.1819e-16       ,            CBSJ = 3.56396e-16      ,

    M3B (NMOS, type NMOS, model EKV 2.6, region SAT (saturation - strong inversion), multiplicity = 1):
      Vds  =  5.04699e-01,  Vgs  =  7.18868e-01,  Vbs  = -1.25287e-04
                WEFF = 2.39e-07         ,            LEFF = 9.412e-06        ,           POWER = 1.26e-07         ,              ID = 2.49529e-07      ,
                  GM = 1.64825e-06      ,             GDS = 1.04493e-09      ,            GMBS = 4.74178e-07      ,           VDSAT = 0.305392         ,
                 VTH = 0.457912         ,          DELVTO = 0               D,              QD = -1.02038e-15     ,              QG = 1.33373e-14      ,
                  QB = -1.06764e-14     ,              QS = -1.64055e-15     ,             CGG = 1.25475e-14      ,             CGD = 1.54003e-18      ,
                 CGS = -1.09377e-14     ,             CGB = -1.61142e-15     ,             CBG = -1.80376e-15     ,             CBD = -2.41858e-19     ,
                 CBS = -2.69615e-15     ,             CBB = 4.50015e-15      ,             CDG = -4.2508e-15      ,             CDD = -4.85233e-19     ,
                 CDS = 5.39154e-15      ,             CDB = -1.14026e-15     ,            QBDJ = 2.73355e-16      ,            QBSJ = 7.12304e-20      ,
                CBDJ = 3.26206e-16      ,            CBSJ = 3.56396e-16      ,

    M4 (PMOS, type PMOS, model EKV 2.6, region SUB (saturation - weak inversion), multiplicity = 1):
      Vds  = -4.24262e-01,  Vgs  = -5.24321e-01,  Vbs  =  4.75679e-01
                WEFF = 2.654e-06        ,            LEFF = 1.08e-07         ,           POWER = 1.0589e-07       ,              ID = -2.4953e-07      ,
                  GM = 7.1963e-06       ,             GDS = 8.57993e-08      ,            GMBS = 1.78042e-06      ,           VDSAT = -0.116706        ,
                 VTH = -0.612628        ,          DELVTO = 0               D,              QD = 1.67862e-18      ,              QG = -1.74317e-15     ,
                  QB = 1.73819e-15      ,              QS = 3.30798e-18      ,             CGG = 6.15811e-16      ,             CGD = 3.27953e-18      ,
                 CGS = -1.35119e-16     ,             CGB = -4.83972e-16     ,             CBG = -4.75968e-16     ,             CBD = -2.53116e-18     ,
                 CBS = -3.86412e-17     ,             CBB = 5.17141e-16      ,             CDG = -4.75082e-17     ,             CDD = -2.54235e-19     ,
                 CDS = 5.90295e-17      ,             CDB = -1.1267e-17      ,            QBDJ = -2.32467e-15     ,            QBSJ = -1.30919e-15     ,
                CBDJ = 2.03402e-15      ,            CBSJ = 2.27146e-15      ,

    M5A (NMOS, type NMOS, model EKV 2.6, region SAT (saturation - strong inversion), multiplicity = 1):
      Vds  =  8.41602e-01,  Vgs  =  8.41853e-01,  Vbs  = -2.51046e-04
                WEFF = 2.39e-07         ,            LEFF = 9.324e-06        ,           POWER = 4.21052e-07      ,              ID = 4.99998e-07      ,
                  GM = 2.35996e-06      ,             GDS = 1.39029e-09      ,            GMBS = 6.83219e-07      ,           VDSAT = 0.393722         ,
                 VTH = 0.457929         ,          DELVTO = 0               D,              QD = -1.54356e-15     ,              QG = 1.47687e-14      ,
                  QB = -1.07904e-14     ,              QS = -2.43479e-15     ,             CGG = 1.2819e-14       ,             CGD = 1.55332e-18      ,
                 CGS = -1.13798e-14     ,             CGB = -1.44074e-15     ,             CBG = -1.69236e-15     ,             CBD = -2.02178e-19     ,
                 CBS = -2.69616e-15     ,             CBB = 4.38873e-15      ,             CDG = -4.42576e-15     ,             CDD = -5.37435e-19     ,
                 CDS = 5.59604e-15      ,             CDB = -1.16974e-15     ,            QBDJ = 4.45353e-16      ,            QBSJ = 1.42727e-19      ,
                CBDJ = 3.14275e-16      ,            CBSJ = 3.56385e-16      ,

    M5B (NMOS, type NMOS, model EKV 2.6, region SAT (saturation - strong inversion), multiplicity = 1):
      Vds  =  4.88919e-01,  Vgs  =  8.41853e-01,  Vbs  = -2.50721e-04
                WEFF = 2.39e-07         ,            LEFF = 9.324e-06        ,           POWER = 2.44394e-07      ,              ID = 4.99353e-07      ,
                  GM = 2.35614e-06      ,             GDS = 2.80426e-09      ,            GMBS = 6.82173e-07      ,           VDSAT = 0.393689         ,
                 VTH = 0.457968         ,          DELVTO = 0               D,              QD = -1.54346e-15     ,              QG = 1.47682e-14      ,
                  QB = -1.07903e-14     ,              QS = -2.43452e-15     ,             CGG = 1.28215e-14      ,             CGD = -2.01629e-18     ,
                 CGS = -1.13794e-14     ,             CGB = -1.44011e-15     ,             CBG = -1.6917e-15      ,             CBD = -1.1116e-18      ,
                 CBS = -2.69611e-15     ,             CBB = 4.38892e-15      ,             CDG = -4.42834e-15     ,             CDD = 2.99529e-18      ,
                 CDS = 5.59573e-15      ,             CDB = -1.17038e-15     ,            QBDJ = 2.652e-16        ,            QBSJ = 1.42543e-19      ,
                CBDJ = 3.26867e-16      ,            CBSJ = 3.56385e-16      ,

    M7 (NMOS, type NMOS, model EKV 2.6, region SUB (saturation - weak inversion), multiplicity = 1):
      Vds  =  3.94975e-01,  Vgs  =  4.95005e-01,  Vbs  = -5.04995e-01
                WEFF = 6.69e-07         ,            LEFF = 1.04e-07         ,           POWER = 9.85815e-08      ,              ID = 2.4953e-07       ,
                  GM = 7.47559e-06      ,             GDS = 1.58118e-07      ,            GMBS = 1.37673e-06      ,           VDSAT = 0.115334         ,
                 VTH = 0.586526         ,          DELVTO = 0               D,              QD = -3.2957e-19      ,              QG = 3.78115e-16      ,
                  QB = -3.77134e-16     ,              QS = -6.51007e-19     ,             CGG = 1.35549e-16      ,             CGD = 1.50933e-18      ,
                 CGS = -2.67494e-17     ,             CGB = -1.10309e-16     ,             CBG = -1.0654e-16      ,             CBD = -1.18441e-18     ,
                 CBS = -7.77359e-18     ,             CBB = 1.15498e-16      ,             CDG = -9.82612e-18     ,             CDD = -1.10055e-19     ,
                 CDS = 1.16936e-17      ,             CDB = -1.75744e-18     ,            QBDJ = 9.22016e-16      ,            QBSJ = 5.34467e-16      ,
                CBDJ = 6.00139e-16      ,            CBSJ = 6.32083e-16      ,

    * ----------------------------------------------------------------------
    * (R) Resistors
    * ----------------------------------------------------------------------

We see that now all the transistors are biased in saturation and that the quiescent output voltage $V_{outq}$ is very close to the input common-mode voltage.

$V_{outq} =$ 900.014 mV

## Large-signal differential transfer characteristic¶

In order to simulate the small-signal diferential open-loop gain we first need to check the differential transfer characteristic in order to find the eventual offset voltage that needs to be added to make sure the output voltage is set at the common-mode voltage.

    .param Vidmin=-9.000e-01 Vidmax=9.000e-01 dVid=2.000e-03
    Starting Smash simulation...

    ----------------------------------------------------------------------
    -
    - SMASH (TM) release 7.6.0 (64-bit) of Jun 30 2020
    - Copyright (c) Dolphin Design, 1992-2020. All Rights Reserved.
    -
    ----------------------------------------------------------------------

    Output directory L:\My Drive\Lectures\Master\Fundamentals of Analog VLSI Design\2024\Jupyter Notebooks\Symmetrical OTA\Symmetrical OTA (VS)\Simulations\smash\Gain
    Parsing circuit l:\My Drive\Lectures\Master\Fundamentals of Analog VLSI Design\2024\Jupyter Notebooks\Symmetrical OTA\Symmetrical OTA (VS)\Simulations\smash\Gain\Symmetrical_OTA.pat
    Loading circuit l:\My Drive\Lectures\Master\Fundamentals of Analog VLSI Design\2024\Jupyter Notebooks\Symmetrical OTA\Symmetrical OTA (VS)\Simulations\smash\Gain\Symmetrical_OTA.pat
    Processing top-level
    Elaborating circuit...
    Elaborating circuit (creating devices)...
    Elaborating circuit (elaborating devices)...
    Elaborating circuit (logic)...
    Elaborating circuit (creating devices)...
    Elaborating circuit (elaborating devices)...
    Initializing...
    Searching for HZ nets: 0%
    Linking analog resolution matrix...
    Load completed.
    DC Transfer - VID.Value
    Operating-Point analysis (trying logarithmic damping heuristics)...
    Number of iterations:   0
    DC transfer analysis completed
    Launch Measurements: 11
    End Measurements

    CPU Time:     1s 562ms 500us
    Elapsed Time: 2s 808ms 639us

    VDD = 1.8 V
    Vic = 0.9 V
    Voutq = 0.900 V
    Voutmax = 1.800 V
    Voutmin = 0.000 V
    Vswing = 1.800 V

The extracted output voltage swing does actually not correspond to the swing of the linear part. We need to zoom into the linear gain region.

    .param Vidmin=5.400e-05 Vidmax=7.400e-05 dVid=5.000e-08
    Starting Smash simulation...

    ----------------------------------------------------------------------
    -
    - SMASH (TM) release 7.6.0 (64-bit) of Jun 30 2020
    - Copyright (c) Dolphin Design, 1992-2020. All Rights Reserved.
    -
    ----------------------------------------------------------------------

    Output directory L:\My Drive\Lectures\Master\Fundamentals of Analog VLSI Design\2024\Jupyter Notebooks\Symmetrical OTA\Symmetrical OTA (VS)\Simulations\smash\Gain
    Parsing circuit l:\My Drive\Lectures\Master\Fundamentals of Analog VLSI Design\2024\Jupyter Notebooks\Symmetrical OTA\Symmetrical OTA (VS)\Simulations\smash\Gain\Symmetrical_OTA.pat
    Loading circuit l:\My Drive\Lectures\Master\Fundamentals of Analog VLSI Design\2024\Jupyter Notebooks\Symmetrical OTA\Symmetrical OTA (VS)\Simulations\smash\Gain\Symmetrical_OTA.pat
    Processing top-level
    Elaborating circuit...
    Elaborating circuit (creating devices)...
    Elaborating circuit (elaborating devices)...
    Elaborating circuit (logic)...
    Elaborating circuit (creating devices)...
    Elaborating circuit (elaborating devices)...
    Initializing...
    Searching for HZ nets: 0%
    Linking analog resolution matrix...
    Load completed.
    DC Transfer - VID.Value
    Operating-Point analysis (trying logarithmic damping heuristics)...
    Number of iterations:   0
    DC transfer analysis completed
    Launch Measurements: 12
    End Measurements

    CPU Time:     1s 593ms 750us
    Elapsed Time: 3s 316ms 812us

    VDD = 1.8 V
    Vic = 0.9 V
    Voutq = 0.900 V
    Vos = 64.093 uV
    Voutmax = 1.351 V
    Voutmin = 0.456 V
    Vswing = 0.895 V

## Open-loop gain¶

### From closed-loop gain simulation¶

In Smash it is unfortunately not possible to export the complex value of the closed-loop gain in batch mode simulation. We can verify this approach using the Smash interface.

### From open-loop simulation¶

Having extracted the offset voltage to make sure that the output voltage is close to the input common-mode voltage, we can now simulate the open-loop gain.

    Starting Smash simulation...

    ----------------------------------------------------------------------
    -
    - SMASH (TM) release 7.6.0 (64-bit) of Jun 30 2020
    - Copyright (c) Dolphin Design, 1992-2020. All Rights Reserved.
    -
    ----------------------------------------------------------------------

    Output directory L:\My Drive\Lectures\Master\Fundamentals of Analog VLSI Design\2024\Jupyter Notebooks\Symmetrical OTA\Symmetrical OTA (VS)\Simulations\smash\Gain
    Parsing circuit l:\My Drive\Lectures\Master\Fundamentals of Analog VLSI Design\2024\Jupyter Notebooks\Symmetrical OTA\Symmetrical OTA (VS)\Simulations\smash\Gain\Symmetrical_OTA.pat
    Loading circuit l:\My Drive\Lectures\Master\Fundamentals of Analog VLSI Design\2024\Jupyter Notebooks\Symmetrical OTA\Symmetrical OTA (VS)\Simulations\smash\Gain\Symmetrical_OTA.pat
    Processing top-level
    Elaborating circuit...
    Elaborating circuit (creating devices)...
    Elaborating circuit (elaborating devices)...
    Elaborating circuit (logic)...
    Elaborating circuit (creating devices)...
    Elaborating circuit (elaborating devices)...
    Initializing...
    Searching for HZ nets: 0%
    Linking analog resolution matrix...
    Load completed.
    Operating-Point analysis (trying logarithmic damping heuristics)...
    Iteration    1, residual  9.000e-01 on EINP
    Iteration    2, residual  6.698e-01 on EINP
    Iteration    3, residual  4.657e-01 on EINP
    Iteration    4, residual  2.924e-01 on EINP
    Iteration    5, residual  1.557e-01 on EINP
    Iteration    6, residual  6.181e-02 on EINP
    Iteration    7, residual  1.368e-02 on EINP
    Iteration    8, residual  8.587e-04 on EINP
    Iteration    9, residual  2.481e-04 on VDD
    Iteration   10, residual  6.784e-05 on VDD
    Iteration   11, residual  6.744e-06 on VDD
    Iteration   12, residual  1.021e-07 on M7::DI
    Iteration   13, residual  1.745e-07 on M7::DI
    Iteration   14, residual  1.656e-07 on M7::DI
    Iteration   15, residual  1.104e-07 on M7::DI
    Iteration   16, residual  7.071e-08 on M7::DI
    Iteration   17, residual  3.078e-08 on M7::DI
    Iteration   18, residual  9.829e-09 on M7::DI
    Iteration   19, residual  2.161e-09 on M7::DI
    Iteration   20, residual  1.343e-10 on M7::DI
    Iteration   21, residual  5.679e-13 on M7::DI
    Iteration   22, residual  1.035e-17 on M7::DI

    Operating point analysis completed (converged)
    Small Signal
    Small signal analysis completed
    Launch Measurements: 12
    End Measurements

    CPU Time:     1s 625ms
    Elapsed Time: 2s 619ms 848us

    Adc = 106.240 dB
    GBW = 1.065e+06 Hz
    Phase at GBW = -100.540 deg
    Phase margin = 79.456 deg

We see a very good match between the small-signal simulations and the theoretical results. We see some discrepancy above the $GBW$, because of additional poles due to parasitic capacitances that have not been accounted for and introduce additional phase shift.

## Input-referred noise¶

We can compare the theoretical input-referred noise to that obtained from simulations.

    Starting Smash simulation...

    ----------------------------------------------------------------------
    -
    - SMASH (TM) release 7.6.0 (64-bit) of Jun 30 2020
    - Copyright (c) Dolphin Design, 1992-2020. All Rights Reserved.
    -
    ----------------------------------------------------------------------

    Output directory L:\My Drive\Lectures\Master\Fundamentals of Analog VLSI Design\2024\Jupyter Notebooks\Symmetrical OTA\Symmetrical OTA (VS)\Simulations\smash\Gain
    Parsing circuit l:\My Drive\Lectures\Master\Fundamentals of Analog VLSI Design\2024\Jupyter Notebooks\Symmetrical OTA\Symmetrical OTA (VS)\Simulations\smash\Gain\Symmetrical_OTA.pat
    Loading circuit l:\My Drive\Lectures\Master\Fundamentals of Analog VLSI Design\2024\Jupyter Notebooks\Symmetrical OTA\Symmetrical OTA (VS)\Simulations\smash\Gain\Symmetrical_OTA.pat
    Processing top-level
    Elaborating circuit...
    Elaborating circuit (creating devices)...
    Elaborating circuit (elaborating devices)...
    Elaborating circuit (logic)...
    Elaborating circuit (creating devices)...
    Elaborating circuit (elaborating devices)...
    Initializing...
    Searching for HZ nets: 0%
    Linking analog resolution matrix...
    Load completed.
    Operating-Point analysis (trying logarithmic damping heuristics)...
    Iteration    1, residual  9.000e-01 on EINP
    Iteration    2, residual  6.698e-01 on EINP
    Iteration    3, residual  4.657e-01 on EINP
    Iteration    4, residual  2.924e-01 on EINP
    Iteration    5, residual  1.557e-01 on EINP
    Iteration    6, residual  6.181e-02 on EINP
    Iteration    7, residual  1.368e-02 on EINP
    Iteration    8, residual  8.587e-04 on EINP
    Iteration    9, residual  2.481e-04 on VDD
    Iteration   10, residual  6.784e-05 on VDD
    Iteration   11, residual  6.744e-06 on VDD
    Iteration   12, residual  1.021e-07 on M7::DI
    Iteration   13, residual  1.745e-07 on M7::DI
    Iteration   14, residual  1.656e-07 on M7::DI
    Iteration   15, residual  1.104e-07 on M7::DI
    Iteration   16, residual  7.071e-08 on M7::DI
    Iteration   17, residual  3.078e-08 on M7::DI
    Iteration   18, residual  9.829e-09 on M7::DI
    Iteration   19, residual  2.161e-09 on M7::DI
    Iteration   20, residual  1.343e-10 on M7::DI
    Iteration   21, residual  5.679e-13 on M7::DI
    Iteration   22, residual  1.035e-17 on M7::DI

    Operating point analysis completed (converged)
    Noise
    Noise analysis completed
    Launch Measurements: 12
    End Measurements

    CPU Time:     1s 609ms 375us
    Elapsed Time: 2s 755ms 612us

Again, there is a good match between the noise simulations and the theoretical results except at frequencies above the unity-gain frequency (1 MHz). As explained above, this is simply due to the fact that the noise coming from all the transistors except that coming from the differential pair M1a-M1b are referred to the input by dividing by the square of the dc gain instead of the square magnitude of the frequency-dependent gain.

As expected the input-referred noise is dominated by the contribution of the differential pair M1a-M1b. The pMOS current mirrors M2a-M2b and M2c-M2d are contributing slightly less, whereas the contribtuion of the nMOS current mirror M3a-M3b is much less. Finally the contributions of the cascode transistors M4 and M7 are negligible.

## Input-referred offset voltage¶

The standard deviation of the random input-referred offset voltage can be simulated in Smash using Monte-Carlo (MC) simulation with 1000 runs. Note that the matching parameters have to be converted to dispersion parameters according to \begin{align*} SIGMAV &= \frac{A_{VT}}{\sqrt{2}},\\ SIGMAI &= \frac{A_{\beta}}{\sqrt{2}}. \end{align*} for both NMOS and pMOS.

The offset voltage is first extracted from the open-loop circuit as shown in Fig. \ref{fig:open_loop_offsetvoltage}. The results of the MC simulation is $\sigma{Vos} = 3.73\,mV$ which is consistent with the dispersion simulation $\sigma{Vos} = 3.77\,mV$ provided by Smash and close to the theoretical estimations $\sigma{Vos} = 3.68\,mV$.

MC simulation of the open-loop transfer characteristic for extracting the offset voltage.

For high gain amplifiers, it is also possible to measure the offset by putting the OPAMP in a closed loop as shown in Fig. \ref{fig:closed_loop_offsetvoltage}. The results of the MC simulation is $\sigma{Vos} = 3.75\,mV$ which is consistent with the dispersion simulation $\sigma{Vos} = 3.77\,mV$ provided by Smash and close to the theoretical estimations $\sigma{Vos} = 3.68\,mV$.

MC simulation using a closed-loop configuration for extracting the offset voltage.

Contribution of the various transistors to the input-referred offset is shown in Fig. \ref{fig:closed_loop_offset_contributions}. It confirms that the differential is the dominant contributor to the offset voltage.

MC closed-loop simulation of the contributions of the differential pair and the current mirror to the input-referred offset.

## Power consumption¶

The total power consumption is given by

$I_{tot} =$ 1.5 µA
$P =$ 2.7 µW

The power consumption of the symmetrical OTA is about 1.5 times larger than that of the simple OTA.

# Simulation results from ngspice¶

The theoretical results can also be compared with results obtained from simulations performed with ngspice. The cells below will run the simulations with ngspice. In order to run the simulations you need to have ngspice installed. Please refer to the moodel site for full instructions.

## Saving parameter file¶

We first write the parameter file for this specific design for running the ngspice simulations.

    .param VDD=1.8 Vic=0.9 Vinp=Vic Vinn=Vic Vos=0.000u Vb1=0.8 Vb2=1.0 Ib=250n
    .param CL=1p
    .param W1=2.800u L1=0.810u W2=0.300u L2=5.140u W3=0.200u L3=9.488u W4=2.600u L4=0.180u W5=0.200u L5=9.400u W7=0.630u L7=0.180u

## Operating point¶

    Starting ngspice simulation...

    Simulation executed successfully.

    ******
    ** ngspice-43 : Circuit level simulation program
    ** Compiled with KLU Direct Linear Solver
    ** The U. C. Berkeley CAD Group
    ** Copyright 1985-1994, Regents of the University of California.
    ** Copyright 2001-2024, The ngspice team.
    ** Please get your ngspice manual from https://ngspice.sourceforge.io/docs.html
    ** Please file your bug-reports at https://ngspice.sourceforge.io/bugrep.html
    ** Creation Date: Jul 13 2024   10:19:33
    ******

    Batch mode

    Comments and warnings go to log-file: ./Simulations/ngspice/Gain/Symmetrical_OTA.op.log

    Contents of the log file:
    ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾

    Using SPARSE 1.3 as Direct Linear Solver
    Note: Starting dynamic gmin stepping
    Note: Dynamic gmin stepping completed
    wrdata: too few args.

    Note: No compatibility mode selected!

    Circuit: simulation of the symmetrical ota designed with the ekv 2.6 model

    Doing analysis at TEMP = 27.000000 and TNOM = 27.000000

    No. of Data Rows : 1

    Node data saved to file ./Simulations/ngspice/Gain/symmetrical_ota.op.ic
    Note: Simulation executed from .control section

The voltages at the various circuit nodes are given below.

| Node name | Node voltage
--- | --- | ---
0 | v(2) | 9.943e-01
1 | v(inn) | 9.000e-01
2 | v(1) | 4.894e-01
3 | v(4) | 9.943e-01
4 | v(inp) | 9.000e-01
5 | v(vdd) | 1.800e+00
6 | v(3) | 7.192e-01
7 | v(6) | 1.319e+00
8 | v(5) | 3.251e-01
9 | v(out) | 3.262e-01
10 | v(vb1) | 8.000e-01
11 | v(8) | 8.422e-01
12 | v(vb2) | 1.000e+00
13 | v(ic) | 9.000e-01
14 | v(id) | 0.000e+00

Looking at the .op file, we see the output voltage is too low and is pushing M7 and M3b out of saturation. This due to the current mismatch in M2c and M2d and between M3a and M3b due to different drain voltages and finite output conductances leading to a different current flowing in M2d and M4 compared to that flowing in M3b and M7. Even if the current difference is very small, it results in a large voltage debiasing at the output because of the high output resistance provided by the cascode stages.

Therefore simulating the open-loop gain for high gain amplifiers is not easy to perform without closing the loop. There are basically two approaches to simulate the open-loop gain for high-gain amplifiers: 1) Imposing a DC offset voltage to the amplifier in open-loop configuration that brings the output voltage back to normal (for example equal to the input common-mode voltage) or 2) Simulating the closed-loop gain (for example in voltage follower mode with a feedback gain of 1) and extracting the open-loop gain from the closed loop gain according to \begin{equation*} A_{open\textsf{-}loop}(\omega)= \frac{A_{closed\textsf{-}loop}(\omega)}{1 - A_{closed\textsf{-}loop}(\omega)}, \end{equation*} where $A_{closed\textsf{-}loop}(\omega)$ is the simulated closed-loop transfer function and $A_{open\textsf{-}loop}(\omega)$, the computed open-loop transfer function. The above relation assumes that the open-loop DC gain is large enough for the input-referred offset voltage to be ignored.

The input-referred offset voltage can be extracted from the closed-loop voltage follower circuit as \begin{equation*} V_{os} = V_{in} - \left(1+\frac{1}{A}\right) \cdot V_{out} \cong V_{in} - V_{out} \quad \textsf{for $A \gg 1$}, \end{equation*} where $A \triangleq A_{open\textsf{-}loop}(0)$ is the open-loop DC gain which can be assumed to be much larger than 1. This means that, provided the DC open-loop gain is sufficiently large, the offset voltage can be measured at the amplifier differential input after imposing the proper input common-mode voltage $V_{ic}$.

We can now simulate the OTA in closed-loop as a voltage follower.

    .param VDD=1.8 Vic=0.9 Vinp=Vic Vinn=Vic Vb1=0.8 Vb2=1.0 Ib=250n
    .param CL=1p
    .param W1=2.800u L1=0.810u W2=0.300u L2=5.140u W3=0.200u L3=9.488u W4=2.600u L4=0.180u W5=0.200u L5=9.400u W7=0.630u L7=0.180u
    Starting ngspice simulation...

    Simulation executed successfully.

    ******
    ** ngspice-43 : Circuit level simulation program
    ** Compiled with KLU Direct Linear Solver
    ** The U. C. Berkeley CAD Group
    ** Copyright 1985-1994, Regents of the University of California.
    ** Copyright 2001-2024, The ngspice team.
    ** Please get your ngspice manual from https://ngspice.sourceforge.io/docs.html
    ** Please file your bug-reports at https://ngspice.sourceforge.io/bugrep.html
    ** Creation Date: Jul 13 2024   10:19:33
    ******

    Batch mode

    Comments and warnings go to log-file: ./Simulations/ngspice/Follower/Symmetrical_OTA.op.log

    Contents of the log file:
    ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾

    Using SPARSE 1.3 as Direct Linear Solver
    Note: Starting dynamic gmin stepping
    Note: Dynamic gmin stepping completed
    wrdata: too few args.

    Note: No compatibility mode selected!

    Circuit: simulation of the symmetrical ota designed with the ekv 2.6 model

    Doing analysis at TEMP = 27.000000 and TNOM = 27.000000

    No. of Data Rows : 1

    Node data saved to file ./Simulations/ngspice/Follower/symmetrical_ota.op.ic
    Note: Simulation executed from .control section

| Node name | Node voltage
--- | --- | ---
0 | v(2) | 9.944e-01
1 | v(out) | 8.999e-01
2 | v(1) | 4.894e-01
3 | v(4) | 9.941e-01
4 | v(inp) | 9.000e-01
5 | v(vdd) | 1.800e+00
6 | v(3) | 7.190e-01
7 | v(6) | 1.324e+00
8 | v(5) | 5.050e-01
9 | v(vb1) | 8.000e-01
10 | v(8) | 8.422e-01
11 | v(vb2) | 1.000e+00

We see that now the ouput voltage is very close to the input voltage that has been set to $V_{ic}$. We can then extract the corresponding offset voltage $V_{os} \cong V_{in} - V_{out}$

$V_{os} =$ 64.000 µV

We can now apply this offset voltage to the open-loop operating point point simulation.

    .param VDD=1.8 Vic=0.9 Vinp=Vic Vinn=Vic Vos=64.000u Vb1=0.8 Vb2=1.0 Ib=250n
    .param CL=1p
    .param W1=2.800u L1=0.810u W2=0.300u L2=5.140u W3=0.200u L3=9.488u W4=2.600u L4=0.180u W5=0.200u L5=9.400u W7=0.630u L7=0.180u

    Starting ngspice simulation...

    Simulation executed successfully.

    ******
    ** ngspice-43 : Circuit level simulation program
    ** Compiled with KLU Direct Linear Solver
    ** The U. C. Berkeley CAD Group
    ** Copyright 1985-1994, Regents of the University of California.
    ** Copyright 2001-2024, The ngspice team.
    ** Please get your ngspice manual from https://ngspice.sourceforge.io/docs.html
    ** Please file your bug-reports at https://ngspice.sourceforge.io/bugrep.html
    ** Creation Date: Jul 13 2024   10:19:33
    ******

    Batch mode

    Comments and warnings go to log-file: ./Simulations/ngspice/Gain/Symmetrical_OTA.op.log

    Contents of the log file:
    ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾

    Using SPARSE 1.3 as Direct Linear Solver
    Note: Starting dynamic gmin stepping
    Note: Dynamic gmin stepping completed
    wrdata: too few args.

    Note: No compatibility mode selected!

    Circuit: simulation of the symmetrical ota designed with the ekv 2.6 model

    Doing analysis at TEMP = 27.000000 and TNOM = 27.000000

    No. of Data Rows : 1

    Node data saved to file ./Simulations/ngspice/Gain/symmetrical_ota.op.ic
    Note: Simulation executed from .control section

| Node name | Node voltage
--- | --- | ---
0 | v(2) | 9.944e-01
1 | v(inn) | 9.000e-01
2 | v(1) | 4.894e-01
3 | v(4) | 9.941e-01
4 | v(inp) | 9.000e-01
5 | v(vdd) | 1.800e+00
6 | v(3) | 7.190e-01
7 | v(6) | 1.324e+00
8 | v(5) | 5.052e-01
9 | v(out) | 9.123e-01
10 | v(vb1) | 8.000e-01
11 | v(8) | 8.422e-01
12 | v(vb2) | 1.000e+00
13 | v(ic) | 9.000e-01
14 | v(id) | 6.400e-05

The operating point information for all transistors can be extracted from the .op file.

| Transistor | ID | Ispec | IC | VDsat | n | Gm | Gms | Gds | Gmb | Rn | Vnth | gamman | Vnfl at 1Hz
--- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | ---
0 | M1a | 2.495e-07 | 2.835e-06 | 8.803e-02 | 1.188e-01 | 1.271e+00 | 6.888e-06 | 8.892e-06 | 1.789e-08 | 1.986e-06 | 9.749e+04 | 4.020e-08 | 6.715e-01 | 2.144e-05
1 | M1b | 2.499e-07 | 2.835e-06 | 8.818e-02 | 1.188e-01 | 1.271e+00 | 6.899e-06 | 8.906e-06 | 1.792e-08 | 1.989e-06 | 9.734e+04 | 4.017e-08 | 6.715e-01 | 2.144e-05
2 | M2a | 2.495e-07 | 1.025e-08 | 2.441e+01 | 3.590e-01 | 1.306e+00 | 1.285e-06 | 1.741e-06 | 1.011e-09 | 4.544e-07 | 6.871e+05 | 1.067e-07 | 8.831e-01 | 6.669e-05
3 | M2b | 2.499e-07 | 1.025e-08 | 2.446e+01 | 3.593e-01 | 1.306e+00 | 1.286e-06 | 1.742e-06 | 1.013e-09 | 4.548e-07 | 6.865e+05 | 1.067e-07 | 8.832e-01 | 6.669e-05
4 | M2c | 2.497e-07 | 1.026e-08 | 2.441e+01 | 3.591e-01 | 1.306e+00 | 1.287e-06 | 1.742e-06 | 8.982e-10 | 4.549e-07 | 6.863e+05 | 1.067e-07 | 8.830e-01 | 6.669e-05
5 | M2d | 2.495e-07 | 1.023e-08 | 2.445e+01 | 3.593e-01 | 1.306e+00 | 1.284e-06 | 1.740e-06 | 1.341e-09 | 4.542e-07 | 6.877e+05 | 1.068e-07 | 8.833e-01 | 6.669e-05
6 | M3a | 2.497e-07 | 1.629e-08 | 1.535e+01 | 3.061e-01 | 1.271e+00 | 1.651e-06 | 2.126e-06 | 7.735e-10 | 4.749e-07 | 5.058e+05 | 9.156e-08 | 8.349e-01 | 2.063e-05
7 | M3b | 2.495e-07 | 1.628e-08 | 1.535e+01 | 3.061e-01 | 1.271e+00 | 1.649e-06 | 2.125e-06 | 1.045e-09 | 4.745e-07 | 5.062e+05 | 9.160e-08 | 8.350e-01 | 2.063e-05
8 | M4 | 2.495e-07 | 3.780e-06 | 6.610e-02 | 1.168e-01 | 1.306e+00 | 7.205e-06 | 9.074e-06 | 8.624e-08 | 1.783e-06 | 8.996e+04 | 3.862e-08 | 6.482e-01 | 1.668e-04
9 | M5a | 5.000e-07 | 1.575e-08 | 3.181e+01 | 3.952e-01 | 1.271e+00 | 2.362e-06 | 3.047e-06 | 1.392e-09 | 6.839e-07 | 3.629e+05 | 7.756e-08 | 8.573e-01 | 2.073e-05
10 | M5b | 4.994e-07 | 1.573e-08 | 3.180e+01 | 3.952e-01 | 1.271e+00 | 2.358e-06 | 3.044e-06 | 2.803e-09 | 6.828e-07 | 3.637e+05 | 7.764e-08 | 8.577e-01 | 2.073e-05
11 | M7 | 2.493e-07 | 4.613e-06 | 5.418e-02 | 1.155e-01 | 1.271e+00 | 7.482e-06 | 9.016e-06 | 1.566e-07 | 1.378e-06 | 8.395e+04 | 3.730e-08 | 6.281e-01 | 1.173e-04

We can check the bias voltages and operating region of each transistor below.

| Type | Function | ID | IC | VG | VS | VD | VDS | VDsat | Region | Saturation
--- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | ---
M1a | n | DP | 2.495e-07 | 8.803e-02 | 4.105e-01 | 0.000e+00 | 5.050e-01 | 5.050e-01 | 1.188e-01 | WI | sat
M1b | n | DP | 2.499e-07 | 8.818e-02 | 4.106e-01 | 0.000e+00 | 5.047e-01 | 5.047e-01 | 1.188e-01 | WI | sat
M2a | p | CM | 2.495e-07 | 2.441e+01 | 8.056e-01 | 0.000e+00 | 8.056e-01 | 8.056e-01 | 3.590e-01 | SI | sat
M2b | p | CM | 2.499e-07 | 2.446e+01 | 8.059e-01 | 0.000e+00 | 8.059e-01 | 8.059e-01 | 3.593e-01 | SI | sat
M2c | p | CM | 2.497e-07 | 2.441e+01 | 1.081e+00 | 0.000e+00 | 9.000e-01 | 9.000e-01 | 3.591e-01 | SI | sat
M2d | p | CM | 2.495e-07 | 2.445e+01 | 4.755e-01 | 0.000e+00 | 4.755e-01 | 4.755e-01 | 3.593e-01 | SI | sat
M3a | n | CM | 2.497e-07 | 1.535e+01 | 7.190e-01 | 0.000e+00 | 7.190e-01 | 7.190e-01 | 3.061e-01 | SI | sat
M3b | n | CM | 2.495e-07 | 1.535e+01 | 7.190e-01 | 0.000e+00 | 5.052e-01 | 5.052e-01 | 3.061e-01 | SI | sat
M4 | p | CA | 2.495e-07 | 6.610e-02 | 1.000e+00 | 4.755e-01 | 8.877e-01 | 4.122e-01 | 1.168e-01 | WI | sat
M5a | n | CM | 5.000e-07 | 3.181e+01 | 8.422e-01 | 0.000e+00 | 8.422e-01 | 8.422e-01 | 3.952e-01 | SI | sat
M5b | n | CM | 4.994e-07 | 3.180e+01 | 8.422e-01 | 0.000e+00 | 4.894e-01 | 4.894e-01 | 3.952e-01 | SI | sat
M7 | p | CA | 2.493e-07 | 5.418e-02 | 1.000e+00 | 5.052e-01 | 9.123e-01 | 4.071e-01 | 1.155e-01 | WI | sat

The output voltage in open-loop is now close to the common-mode input voltage $V_{ic}$. We can now proceed with the simulation of the open-loop large-signal transfer characteristic.

## Large-signal differential transfer characteristic¶

We now simulate the DC differential transfer characteristic. We can then check the systematic offset voltage that was extracted above.

    Starting NGSpice simulation...

    Simulation executed successfully.

    ******
    ** ngspice-43 : Circuit level simulation program
    ** Compiled with KLU Direct Linear Solver
    ** The U. C. Berkeley CAD Group
    ** Copyright 1985-1994, Regents of the University of California.
    ** Copyright 2001-2024, The ngspice team.
    ** Please get your ngspice manual from https://ngspice.sourceforge.io/docs.html
    ** Please file your bug-reports at https://ngspice.sourceforge.io/bugrep.html
    ** Creation Date: Jul 13 2024   10:19:33
    ******

    Batch mode

    Comments and warnings go to log-file: ./Simulations/ngspice/Gain/Symmetrical_OTA.dc.log

    Contents of the log file:
    ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾

    Using SPARSE 1.3 as Direct Linear Solver
    Note: Starting dynamic gmin stepping
    Note: Dynamic gmin stepping completed
    Using SPARSE 1.3 as Direct Linear Solver
    Note: Starting dynamic gmin stepping
    Note: Dynamic gmin stepping completed

    Note: No compatibility mode selected!

    Circuit: simulation of the symmetrical ota designed with the ekv 2.6 model

    Doing analysis at TEMP = 27.000000 and TNOM = 27.000000

    No. of Data Rows : 1
    Doing analysis at TEMP = 27.000000 and TNOM = 27.000000

    No. of Data Rows : 901
    voutmax             =  1.800000e+00 at=  9.000000e-01
    voutmin             =  9.327409e-09 at=  -9.000000e-01
    vos                 =  9.353059e-04
    Note: Simulation executed from .control section

    VDD = 1.8 V
    Vic = 0.9 V
    Vos = 64.000 uV
    Voutq = 0.912 V
    Voutmax = 1.800 V
    Voutmin = 0.000 V
    Vswing = 1.800 V

We can now zoom into the high gain region and extract a more accurate value of the offset voltage.

    Starting NGSpice simulation...

    Simulation executed successfully.

    ******
    ** ngspice-43 : Circuit level simulation program
    ** Compiled with KLU Direct Linear Solver
    ** The U. C. Berkeley CAD Group
    ** Copyright 1985-1994, Regents of the University of California.
    ** Copyright 2001-2024, The ngspice team.
    ** Please get your ngspice manual from https://ngspice.sourceforge.io/docs.html
    ** Please file your bug-reports at https://ngspice.sourceforge.io/bugrep.html
    ** Creation Date: Jul 13 2024   10:19:33
    ******

    Batch mode

    Comments and warnings go to log-file: ./Simulations/ngspice/Gain/Symmetrical_OTA.dc.log

    Contents of the log file:
    ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾

    Using SPARSE 1.3 as Direct Linear Solver
    Note: Starting dynamic gmin stepping
    Note: Dynamic gmin stepping completed
    Using SPARSE 1.3 as Direct Linear Solver
    Note: Starting dynamic gmin stepping
    Note: Dynamic gmin stepping completed

    Note: No compatibility mode selected!

    Circuit: simulation of the symmetrical ota designed with the ekv 2.6 model

    Doing analysis at TEMP = 27.000000 and TNOM = 27.000000

    No. of Data Rows : 1
    Doing analysis at TEMP = 27.000000 and TNOM = 27.000000

    No. of Data Rows : 401
    vos                 =  6.394047e-05
    voutmax             =  1.352747e+00 at=  7.400000e-05
    voutmin             =  4.559414e-01 at=  5.400000e-05
    Note: Simulation executed from .control section

    VDD = 1.8 V
    Vic = 0.9 V
    Vos = 63.940 uV
    Voutq = 0.912 V
    Voutmax = 1.353 V
    Voutmin = 0.456 V
    Vswing = 0.897 V

    .param VDD=1.8 Vic=0.9 Vinp=Vic Vinn=Vic Vos=63.940u Vb1=0.8 Vb2=1.0 Ib=250n
    .param CL=1p
    .param W1=2.800u L1=0.810u W2=0.300u L2=5.140u W3=0.200u L3=9.488u W4=2.600u L4=0.180u W5=0.200u L5=9.400u W7=0.630u L7=0.180u

## Open-loop gain¶

### Closed-loop circuit¶

As explained above we can extract the open-loop gain from the simulated closed-loop gain with the amplifier operating as a voltage follower. The open-loop gain is then given by \begin{equation*} A_{open\textsf{-}loop}(\omega)= \frac{A_{closed\textsf{-}loop}(\omega)}{1 - A_{closed\textsf{-}loop}(\omega)}, \end{equation*} where $A_{closed\textsf{-}loop}(\omega)$ is the simulated closed-loop transfer function and $A_{open\textsf{-}loop}(\omega)$, the computed open-loop transfer function. The above relation assumes that the open-loop DC gain is large enough for the input-referred offset voltage to be ignored.

Note that we need to have a sufficient number of digits for the simulated closed-loop gain because the later is very close to 1.

    Starting NGSpice simulation...

    Simulation executed successfully.

    ******
    ** ngspice-43 : Circuit level simulation program
    ** Compiled with KLU Direct Linear Solver
    ** The U. C. Berkeley CAD Group
    ** Copyright 1985-1994, Regents of the University of California.
    ** Copyright 2001-2024, The ngspice team.
    ** Please get your ngspice manual from https://ngspice.sourceforge.io/docs.html
    ** Please file your bug-reports at https://ngspice.sourceforge.io/bugrep.html
    ** Creation Date: Jul 13 2024   10:19:33
    ******

    Batch mode

    Comments and warnings go to log-file: ./Simulations/ngspice/Follower/Symmetrical_OTA.ac.log

    Contents of the log file:
    ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾

    Using SPARSE 1.3 as Direct Linear Solver
    Note: Starting dynamic gmin stepping
    Note: Dynamic gmin stepping completed
    Using SPARSE 1.3 as Direct Linear Solver
    Note: Starting dynamic gmin stepping
    Note: Dynamic gmin stepping completed

    Note: No compatibility mode selected!

    Circuit: simulation of the symmetrical ota designed with the ekv 2.6 model

    Doing analysis at TEMP = 27.000000 and TNOM = 27.000000

    No. of Data Rows : 1
    ASCII raw file "./Simulations/ngspice/Follower/Symmetrical_OTA.ac.op"
    Doing analysis at TEMP = 27.000000 and TNOM = 27.000000

    No. of Data Rows : 370
    fc                  =  9.440595e+05
    Note: Simulation executed from .control section

    Adc = 105.458 dB
    GBW = 1.058e+06 Hz
    Phase at GBW = -99.170 deg
    Phase margin = 80.830 deg

### Open-loop circuit¶

After having checked the operating point information, extracted the offset voltage and making sure that the OTA output is not saturated, we can now proceed with the open-loop gain simulation.

    Starting NGSpice simulation...

    Simulation executed successfully.

    ******
    ** ngspice-43 : Circuit level simulation program
    ** Compiled with KLU Direct Linear Solver
    ** The U. C. Berkeley CAD Group
    ** Copyright 1985-1994, Regents of the University of California.
    ** Copyright 2001-2024, The ngspice team.
    ** Please get your ngspice manual from https://ngspice.sourceforge.io/docs.html
    ** Please file your bug-reports at https://ngspice.sourceforge.io/bugrep.html
    ** Creation Date: Jul 13 2024   10:19:33
    ******

    Batch mode

    Comments and warnings go to log-file: ./Simulations/ngspice/Gain/Symmetrical_OTA.ac.log

    Contents of the log file:
    ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾

    Using SPARSE 1.3 as Direct Linear Solver
    Note: Starting dynamic gmin stepping
    Note: Dynamic gmin stepping completed
    Using SPARSE 1.3 as Direct Linear Solver
    Note: Starting dynamic gmin stepping
    Note: Dynamic gmin stepping completed

    Note: No compatibility mode selected!

    Circuit: simulation of the symmetrical ota designed with the ekv 2.6 model

    Doing analysis at TEMP = 27.000000 and TNOM = 27.000000

    No. of Data Rows : 1
    ASCII raw file "./Simulations/ngspice/Gain/Symmetrical_OTA.ac.op"
    Doing analysis at TEMP = 27.000000 and TNOM = 27.000000

    No. of Data Rows : 370
    adc                 =  1.068018e+02 at=  1.000000e-01
    gbw                 =  1.068837e+06
    pgbw                =  -9.959274e+01
    Note: Simulation executed from .control section

    Adc = 106.802 dB
    GBW = 1.069e+06 Hz
    Phase at GBW = -99.593 deg
    Phase margin = 80.407 deg

We see a very good match between the simulation and the theoretical prediction for the $GBW$. However, the simulated dc gain is higher than the predicted one, which is due to the poor output conductance model. But this is OK since it is larger than the specs.

## Input-referred noise¶

We can compare the theoretical input-referred noise to that obtained from simulations.

    Starting NGSpice simulation...

    Simulation executed successfully.

    ******
    ** ngspice-43 : Circuit level simulation program
    ** Compiled with KLU Direct Linear Solver
    ** The U. C. Berkeley CAD Group
    ** Copyright 1985-1994, Regents of the University of California.
    ** Copyright 2001-2024, The ngspice team.
    ** Please get your ngspice manual from https://ngspice.sourceforge.io/docs.html
    ** Please file your bug-reports at https://ngspice.sourceforge.io/bugrep.html
    ** Creation Date: Jul 13 2024   10:19:33
    ******

    Batch mode

    Comments and warnings go to log-file: ./Simulations/ngspice/Gain/Symmetrical_OTA.nz.log

    Contents of the log file:
    ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾

    Using SPARSE 1.3 as Direct Linear Solver
    Note: Starting dynamic gmin stepping
    Note: Dynamic gmin stepping completed
    Using SPARSE 1.3 as Direct Linear Solver
    Note: Starting dynamic gmin stepping
    Note: Dynamic gmin stepping completed

    Note: No compatibility mode selected!

    Circuit: simulation of the symmetrical ota designed with the ekv 2.6 model

    Doing analysis at TEMP = 27.000000 and TNOM = 27.000000

    No. of Data Rows : 1
    Doing analysis at TEMP = 27.000000 and TNOM = 27.000000

    No. of Data Rows : 370

    No. of Data Rows : 1
    Note: Simulation executed from .control section

We observe a very good match between the predicted and simulated input-referred noise which is completely dominated by the flicker noise contribution.

# Conclusion¶

This notebook presented the detailed analysis and design of the symmetrical OTA. The analysis allowed to derive the design equations to achieve the target specifications. The latter have been checked by simulations with the Smash simulator. The simulations match the expected results derived from the analysis.